How do I discover what package provides a certain file?

Michael R. Head burner at suppressingfire.org
Sat Feb 24 05:06:51 UTC 2007


On Fri, 2007-02-23 at 21:36 -0500, Eric Dunbar wrote:
> Hi all, I was trying to figure out what package on my Ubuntu 6.06 LTS
> box provided a certain file.
> 
> In YellowDogLinux (FC-based distro) I've always used:
> 
> yum provides insertfilenamehere
> 
> And yum (yellowdog updater modified) spits out the package to which
> that file belongs.
> 
> I've scoured the man pages for apt-* (including aptitude) without
> success. It seems the search functionality in apt-get is  limited,
> poorly documented or both.
> 
> I used Synaptic successfully, but the only reason it found the package
> is that the file name was actually part of the package description.
> 
> 1. Anyone know how to easily search the files installed by packages?

dpkg -L <packagename>
That will give you the list of files for a given (installed) package
dpkg -S <filename>
That will give you the package that provides a given (installed) file

> 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
> -- 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 tend to use http://packages.ubuntu.com but others have suggested
apt-cache which will work without a browser.

-- 
Michael R. Head <burner at suppressingfire.org>
http://www.suppressingfire.org/~burner/
http://suppressingfire.livejournal.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20070224/6ae87798/attachment.bin>


More information about the ubuntu-users mailing list