How to find the package which contains a specific file or directory

I found the webpage Ubuntu Tips and Tricks which has some nice hints on how to find the package that provides a file or directory

How to find the package that provides a specific file:
$ dpkg ?S /bin/ls
coreutils: /bin/ls

How to find the package even if it’s not installed that provides a specific file:
First you need to install apt-file
$ sudo apt-file update

Now you can look for the packe by
$ apt-file search /usr/bin/jove
jove: usr/bin/jove

Leave a Reply

Your email address will not be published.

*

*