Skip to main content

apt: Find Application Source Package

Problem

On Debian based systems, apt acts as a wrapper around dpkg to manage dependencies and conflicts when installing and removing an application.

You have a binary installed on your system and you want to trace down which package installed this binary (assuming it was installed by apt and not compiled from source).

 

Solution

dpkg

dpkg -S program_name

You can pass the program name if it's in your $PATH variable

dpkg -S /path/to/program

Or, you can pass the path to the binary instead

apt-file

apt-file search /path/to/program

With apt-file, use the full path, as single word searches are too broad