Skip to the content.

Ubuntu APT Package Manager

Advanced Package Tool.

Search for a Package

apt search <package>

List Package Versions

apt list -a <package>

Eg. for docker-ce this could list something like:

apt list -a docker-ce

# output
docker-ce/bionic 5:18.09.7~3-0~ubuntu-bionic amd64
docker-ce/bionic 5:18.09.6~3-0~ubuntu-bionic amd64
docker-ce/bionic 5:18.09.5~3-0~ubuntu-bionic amd64

Install Specific Package Version

apt install <package>=<version>

Eg. for docker-ce:

apt install docker-ce=5:18.09.6~3-0~ubuntu-bionic

‘Hold’ a Package back on a Specific Version (the current version)

apt-mark hold <package>

This will hold the package back from updating when running apt upgrade (the package will look to be upgradeable, but will actually be hold back).

The hold packages can be shown with

apt-mark showhold