↑ ↓ select, Enter open, Esc close

Find the package that provides a file not yet installed

Adjust the values, the command updates live
user@server
apt-file search bin/mysqldump

Searches the file lists of all packages from the configured sources and shows which packages contain a file with this path fragment. Helpful for command not found or when a specific header file is missing for a build. Unlike dpkg -S, it also finds packages that are not installed.

Note: apt-file is not preinstalled. Run apt install apt-file and then apt-file update once as root.

Also searched as

  • command not found which package to install
  • which package contains this file debian
  • apt-file search example

Related one-liners

All in Debian and APT

Read first, then run.

The commands on myline.de act directly on servers, files and databases. A wrong path or placeholder can delete data irreversibly or make a server unreachable.

  • All commands are provided without warranty and are not tested on every system.
  • Understand what a command does before running it, and check every placeholder.
  • Make a backup first and, if possible, try it on a test system.
  • You run commands at your own risk. Liability for damages is excluded to the extent permitted by law.