Shell Person Help me keep the shell people alive.


Identifying a Program’s Package in Debian

If you need to discover from which package a particular program came from, you can use this command (note that that is a capital "S"):

dpkg -S /usr/bin/file_i_am_curious_about

Here's an example:

james@tv:~$ dpkg -S /usr/bin/sensible-browser 
debianutils: /usr/bin/sensible-browser

This was necessary because I apparently deleted /usr/bin/sensible-browser (which is a script that determines which web browser should be the default). To replace it, I needed to know the original package name, which turned out to be debianutils. From there it was a simple matter to do:

sudo apt-get install --reinstall debianutils

Tagged as: , No Comments