Ubuntu: Find Out from which Package a File Came from

It usually happens that we have a file in our system that makes us think from where did it come from? Or even that you are unable recall from which package did this file came?

If this is a common problem with you then just install the dlocate utility that is a good way to find the answer. Use the following command to install it

sudo apt-get install dlocate

Now to get information about the file, use the following command

dlocate filename

This will provide you with all the info about the file. See the following example:

$ dlocate flac
libxine1: /usr/lib/xine/plugins/1.1.4/xineplug_flac.so
libtunepimp5: /usr/lib/tunepimp/plugins/flac.tpp
gstreamer0.10-plugins-good: /usr/lib/gstreamer-0.10/libgstflac.so
flac: /.
flac: /usr
flac: /usr/bin
flac: /usr/bin/flac

All the files are listed that partially match the given file name, so to gain info about a particular file, just give its whole location in the filename.

Leave a Reply