Eric Park
Eric Park

Reputation: 13

Version of Linux Mint apt itself

How do you check the version of apt package manager on Linux Mint? I'm not talking about the packages, but the apt itself. For instance, for dpkg,

dpkg --version

returns its correct version. Is there an equivalent for apt?

Upvotes: 0

Views: 212

Answers (2)

Pere Gellida
Pere Gellida

Reputation: 11

On my Debian 10.5 "apt --version" or "apt -v" shows the version of the apt command.

Upvotes: 1

Niklas Mertsch
Niklas Mertsch

Reputation: 1489

As for some reason apt --version does not seem to work for you, you can check via apt list, which version of apt is installed:

apt list --installed 2>/dev/null | grep ^apt/

On my Ubuntu 20.10, the result is apt/groovy,now 2.1.10 amd64 [installed,automatic], so the version is 2.1.10 (which is also what apt --version is telling me).

Explanation:

  1. apt list --installed shows all installed packages.
  2. 2>/dev/null silences the warning that apt always shows when it is used in pipes (just for convenience, not necessary)
  3. grep ^apt/ filters out all lines which do not start with apt/, so you don't have to scroll through all installed packages

Upvotes: 1

Related Questions