Ameba Ownd

アプリで簡単、無料ホームページ作成

Apt-get search package file

2022.01.16 00:42




















Let us go through each of these in order. The apt-cache search command is very common when you want to use the apt command to search for a package. It is designed to search the package name along with its metadata such as the description, dependencies, source, and version.


The command returns all the packages whose name or metadata matches the specified search keyword. Following is the syntax for searching a package using the apt-cache search command. Another method to search for available packages in your repository is to use the apt search command. This command is designed to search all the available packages in our local repository.


If found, it will return the names for all the packages whose name matches our specified search keyword. This is how the syntax for this command looks. As you can see, the above screenshot shows that the data is a little more organized and visually pleasing compared to the apt-cache search output. The sudo package is listed close to the end of this list. Alternatively, you can use the apt-file command. This is a command-line tool which is a part of the APT package manager.


It is specifically designed to search for packages and the files stored in them as part of your repository. The tool does not build software from the source code. Instead, it compiles the source code or uses precompiled files to install software packages. Along with apt-get , there is also the apt utility. Note: All these commands, except the apt-cache search command, only work within root or superuser sudo privileges. Below you will find how to use the apt-get command to work with packages and software on your Linux system.


Read through the list to learn more about the possibilities of apt-get. Before you install a package, it is crucial to resynchronize the package index files and update the package repository to the latest version. This ensures that the packages you install are up-to-date. Search for dependencies with newer versions, install new packages, and remove old ones automatically:. Note: Be careful when using dist-upgrade as it may remove some packages you still need on your system.


To follow the changes made to the Status field of available packages by the traditional Debian packaging tool dselect and perform actions necessary to realize that state, use the command:. If you do not know the exact name of the package, type in the first few letters and press TAB. The system will suggest all the packages available, starting with those letters. I tried to make an edit to that answer, but it got rejected though not by Alexx. I was trying to track down what installed which on my system.


The apt-whatprovides script works for files that are and are not on your system. For example, my system lacked dig but had ping so this it what resulted:. Notice that Searching for is a complete path for ping installed and just the binary name for dig not installed. After a little work I created apt-whatprovides.


What is pacapt :. Ubuntu Community Ask! Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group.


Create a free Team What is Teams? Learn more. How do I find the package that provides a file? Ask Question. Asked 11 years, 5 months ago. Active 3 months ago. Viewed k times. Improve this question. Braiam David Z David Z 8, 5 5 gold badges 24 24 silver badges 22 22 bronze badges. Same on SU: superuser. None of the answers here actually cover the Provides: mechanism. See also askubuntu. Add a comment. Active Oldest Votes. You can use dpkg command to find out which installed package owns a file: From man dpkg : -S, --search filename-search-pattern Search for a filename from installed packages.


Improve this answer. Masood Khaari 6 6 bronze badges. Ressu Ressu I highly recommend using dlocate, which is updated daily for faster lookups. DanielTChen, but dlocate may not do the job, if dlocate's database is out of date.


You have to call sudo update-dlocatedb to update it. If dpkg the exact path doesn't return anything e. Show 4 more comments. Merlijn Sebrechts 6, 1 1 gold badge 37 37 silver badges 65 65 bronze badges. In my opinion this should be the accepted answer.