Debian/Ubuntu cheat sheet

Find packages that contain a file

apt-file search "somefile"

List all installed packages

% apt-cache pkgnames
% dpkg -l

List files owned by package

% dpkg -L pkg

What package owns a file

% dpkg -S /path/to/file

Display package information

% dpkg -p pkg