commands.sh

apt-file

linux

Search for files in `apt` packages, including ones not yet installed.

More info →

Options (2)

boolean

Search for packages that contain the specified file or path

Example: apt-file {{[find|search]}} {{path/to/file}}
-x, --regexpboolean

Search for packages that match the `regex`

Example: apt-file {{[find|search]}} {{[-x|--regexp]}} {{regex}}

Examples (4)

Update the metadata database

sudo apt update

Search for packages that contain the specified file or path

apt-file [find|search] path/to/file

List the contents of a specific package

apt-file list package

Search for packages that match the `regex`

apt-file [find|search] [-x|--regexp] regex
made by @shridhargupta | data from tldr-pages