Issue
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?
Solution
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:
apt list --installed
shows all installed packages.2>/dev/null
silences the warning thatapt
always shows when it is used in pipes (just for convenience, not necessary)grep ^apt/
filters out all lines which do not start withapt/
, so you don't have to scroll through all installed packages
Answered By - Niklas Mertsch Answer Checked By - Terry (WPSolving Volunteer)