↑ ↓ select, Enter open, Esc close

Compare installed and available package versions

Adjust the values, the command updates live
user@server
apt-cache policy nginx

Prints the installed version (Installed), the installation candidate (Candidate) and the version table with all sources and their priorities for a package. This shows whether an update is pending and which repository it would come from. Especially useful when several sources offer the same package, such as Debian and a vendor repository.

Note: Without a package name, apt-cache policy shows the priorities of all configured sources.

Also searched as

  • check installed package version debian
  • which repository does a package come from
  • apt-cache policy explained
  • why does apt install the wrong version

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.