[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How do I find what debian package ships a given program?



On Sun, Feb 11, 2007 at 04:40:55PM -0500, cga2000 wrote:
> Is there a debian utility that returns the name of a package that ships
> a given program..?
> 
> ie. - You're looking for program "pgm" .. so you type "whichpkg pgm"
> from the prompt and the whichpkg utility returns the name of the
> package(s).
> [...]

If you want to know which package an already installed file belongs
to, then dlocate is a fast tool to find out which package the file
belongs to, i.e.:

$ dlocate `which dlocate`

But as far as I can see it really only works on installed packages.

To search the files lists of all availabe packages you can use

$ apt-file search `which apt-file`

But this should only be done for files not already installed, because
from my experience it is really slow compared to dlocate.

Also dlocate should already be installed while apt-file is an optional
package. But its database is only updated once a day by a cron job.
You may have to invoke update-dlocatedb manually if you have installed
a package after the cron.daily finished.
OTH the database of apt-file always has to be updated manually by:

# apt-file update

At least that is the dafault, of course you can create a cron job for
apt-file update too.


Regards
-- 
Marcus Blumhagen

"Any intelligent fool can make things bigger, more complex, and more
violent. It takes a touch of genius -- and a lot of courage -- to move
in the opposite direction."
                                                      -- Albert Einstein

Attachment: signature.asc
Description: Digital signature


Reply to: