After I upgraded a package, when I ran apt-cache policy <package-name>
, I saw that the previous version of this same package is not there in the list.
Before the bind9-dnsutils package was upgraded, cache list showed three different versions of this package:
$ apt-cache policy bind9-dnsutils
bind9-dnsutils:
Installed: 1:9.16.1-0ubuntu2.8
Candidate: 1:9.16.1-0ubuntu2.9
Version table:
1:9.16.1-0ubuntu2.9 500
500 http://pl.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
500 http://pl.archive.ubuntu.com/ubuntu focal-security/main amd64 Packages
*** 1:9.16.1-0ubuntu2.8 100
100 /var/lib/dpkg/status
1:9.16.1-0ubuntu2 500
500 http://pl.archive.ubuntu.com/ubuntu focal/main amd64 Packages
I performed bind9-dnsutils package upgrade to the latest version successfully. After package bind9-dnsutils is upgraded, when checked the cache list for this package is not showing the previous version 1:9.16.1-0ubuntu2.8 in the list.
$ sudo aptitude install bind9-dnsutils=1:9.16.1-0ubuntu2.9
bind9-dnsutils:
Installed: 1:9.16.1-0ubuntu2.9
Candidate: 1:9.16.1-0ubuntu2.9
Version table:
*** 1:9.16.1-0ubuntu2.9 500
500 http://pl.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
500 http://pl.archive.ubuntu.com/ubuntu focal-security/main amd64 Packages
100 /var/lib/dpkg/status
1:9.16.1-0ubuntu2 500
500 http://pl.archive.ubuntu.com/ubuntu focal/main amd64 Packages
As a result if I try to downgrade to version 1:9.16.1-0ubuntu2.8 I get this error message:
Unable to find a version "1:9.16.1-0ubuntu2.8" for the package "bind9-dnsutils"
Unable to apply some actions, aborting
Is there a way to maintain the immediate previous version in the cache so, that I can rollback to it in case I have to do so?