Find where apt-get installed packages

Searching this is somehow not very productive. It’s bordering on impossibility.

If you’re wondering where exactly an apt-get package installed the source / relevant source files into your system, you sometimes need to use dpkg -L to list all files associated with a package.

I’ve done some ugly greps in the past across a huge portion of the filesystem – not a pretty sight.

First try the whereis command, the locate command, and which command if you know an executable from your package.

If you’re just looking for the source though it’s often difficult.

Use dpkg to find apt-get installed source files

Use dpkg -l to list all packages installed by apt-get. Grep it to find your package name.

Use dpkg -L my_package_name to find all source files. A quick glance and you’ll see where your lost code is : )

$> dpkg -l | grep my_package # find the package name
$> dpkg -L my_package_name

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s