Downgrade and keep specific package version.

Display available package versions on Debian and Ubuntu.

$ apt-cache madison ubuntu-advantage-extra-tools 
ubuntu-advantage-extra-tools | 27.9~22.04.1 | http://pl.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
ubuntu-advantage-extra-tools | 27.7~22.04.1 | http://pl.archive.ubuntu.com/ubuntu jammy/main amd64 Packages

Downgrade package.

$ sudo apt install --yes --allow-downgrades ubuntu-advantage-extra-tools=27.7~22.04.1
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be DOWNGRADED:
  ubuntu-advantage-extra-tools
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Need to get 844 kB of archives.
After this operation, 35.8 kB disk space will be freed.
Get:1 http://pl.archive.ubuntu.com/ubuntu jammy/main amd64 ubuntu-advantage-extra-tools amd64 27.7~22.04.1 [844 kB]
Fetched 844 kB in 1s (1,242 kB/s)              
Preconfiguring packages ...
dpkg: warning: downgrading ubuntu-advantage-extra-tools from 27.9~22.04.1 to 27.7~22.04.1
(Reading database ... 108859 files and directories currently installed.)
Preparing to unpack .../ubuntu-advantage-extra-tools_27.7~22.04.1_amd64.deb ...
Unpacking ubuntu-advantage-extra-tools (27.7~22.04.1) over (27.9~22.04.1) ...
Setting up ubuntu-advantage-extra-tools (27.7~22.04.1) ...
Installing new version of config file /etc/ubuntu-advantage/help_data.yaml ...
Installing new version of config file /etc/ubuntu-advantage/uaclient.conf ...
Created symlink /etc/systemd/system/multi-user.target.wants/ua-license-check.path → /lib/systemd/system/ua-license-check.path.
Processing triggers for man-db (2.10.2-1) ...
Scanning processes...
Scanning processor microcode...
Scanning linux images...

Running kernel seems to be up-to-date.

The processor microcode seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.

Mark package as held back.

$ sudo apt-mark hold ubuntu-advantage-extra-tools
ubuntu-advantage-extra-tools set on hold.

Display packages on hold.

$ apt-mark showhold
ubuntu-advantage-extra-tools

This will prevent package from being automatically upgraded.

$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  ubuntu-advantage-extra-tools
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

Cancel a previous operation.

$ sudo apt-mark unhold ubuntu-advantage-extra-tools
Canceled hold on ubuntu-advantage-extra-tools.

Package will be upgraded as all action are allowed again.

$ sudo apt upgrade --yes
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
  ubuntu-advantage-extra-tools
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 849 kB of archives.
After this operation, 35.8 kB of additional disk space will be used.
Get:1 http://pl.archive.ubuntu.com/ubuntu jammy-updates/main amd64 ubuntu-advantage-extra-tools amd64 27.9~22.04.1 [849 kB]
Fetched 849 kB in 1s (1,486 kB/s)              
Preconfiguring packages ...
(Reading database ... 108857 files and directories currently installed.)
Preparing to unpack .../ubuntu-advantage-extra-tools_27.9~22.04.1_amd64.deb ...
Unpacking ubuntu-advantage-extra-tools (27.9~22.04.1) over (27.7~22.04.1) ...
Setting up ubuntu-advantage-extra-tools (27.9~22.04.1) ...
Installing new version of config file /etc/ubuntu-advantage/help_data.yaml ...
Installing new version of config file /etc/ubuntu-advantage/uaclient.conf ...
Processing triggers for man-db (2.10.2-1) ...
Scanning processes...
Scanning processor microcode...
Scanning linux images...

Running kernel seems to be up-to-date.

The processor microcode seems to be up-to-date.

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.
ko-fi