How do I discover what package provides a certain file?

Derek Broughton news at pointerstop.ca
Sun Feb 25 01:37:21 UTC 2007


Ouattara Oumar Aziz wrote:

> Eric Dunbar a écrit :
>> 1. Anyone know how to easily search the files installed by packages?
> 
> # Set up apt-file
> apt-get intall apt-file
> apt-file update
> 
> # Search for my_file
> apt-file search my_file

Also "dlocate", which uses the locate database to find a file, then tells
you what package installed it (apt-file can tell you what package has a
file that you don't even have on your system).
> 
>> 2. Second though, anyone know how to use apt-get et al. to search for
>> packages (like yum find xyz)? aptitude can do it but I really don't
>> like its interface (its user interface could handle a major overhaul

Well, the CLI is pretty much the same as apt-get, so why would you want to? 
One thing apt-get doesn't do though is:

aptitude search package 

(how difficult was that?)

>> -- the irony is that it's designed so people don't have to fiddle with
>> apt-get but it's designed for people who read man pages and memorise
>> commands ;-)... exactly the crowd who don't need something like
>> aptitude ;-P)

I'm part of that crowd, and always use aptitude rather than any of the other
package tools.

> apt-cache search regex

It _is_ better than aptitude imo - aptitude's search can do some things that
apt-cache can't (like searching for "New" packages, Manually installed (or
not), etc, but that stuff requires checking the man page every time :-) 
The default search by apt-cache is more inclusive than the default by
aptitude.
-- 
derek





More information about the ubuntu-users mailing list