Ubuntu – Need to try to install a specific package version — however apt-cache madison, apt-cache policy only seem to list the latest version


Other SE posts, for example this, show how you can install a specific package version. However, I'm unsure what exactly the naming convention / syntax used for the version I want is.

I need to install rdiff-backup version 1.2.8, but I'm unclear from looking through github (I'm a noob) what the full package version would be called.
Edit: I should note that I did try the syntax of,

sudo apt-get install rdiff-backup=1.2.8

as well as

sudo apt-get install rdiff-backup=1.2.8-1ubuntu1 \

(the latter just blindly copying the syntax shown in the linked example, in the off chance it worked.)

And as the title states, the commands I've looked up that people say should list all or old versions of packages don't seem to work as intended (or as I understand them).

Thanks for your time.

Best Answer

  • Unless you have the specific package version's .deb file downloaded, you can only get what's available in the Ubuntu Repositories (or third party repos or PPAs configured on your system), and usually they only keep the Latest Copy of the package available in the Ubuntu repository itself at any given time.

    This is the rmadison output for rdiff-backup in all current releases:

    $ rmadison -u ubuntu rdiff-backup
     rdiff-backup | 1.2.8-7 | precise/universe | source, amd64, armel, armhf, i386, powerpc
     rdiff-backup | 1.2.8-7 | trusty/universe  | source, amd64, arm64, armhf, i386, powerpc, ppc64el
     rdiff-backup | 1.2.8-7 | xenial/universe  | source, amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
     rdiff-backup | 1.2.8-7 | bionic/universe  | source, amd64, arm64, armhf, i386, ppc64el, s390x
     rdiff-backup | 2.0.0-1 | focal/universe   | source, amd64, arm64, armhf, ppc64el, riscv64, s390x
     rdiff-backup | 2.0.5-1 | groovy/universe  | source, amd64, arm64, armhf, ppc64el, riscv64, s390x

    Therefore, if you are using any release before 20.04, you are stuck with either Nothing (because EOL) or 1.2.8-7. Any release after and including 20.04, you're stuck with 2.0.0 or later.

    If you want another version, you'll have to go digging elsewhere because older versions would be ancient, and any OLDER version than 1.2.8-7 (while you can go hunting to TRY and find the .deb for it in older pages and such, or try and compile the older versions yourselves, both of which are nasty options because you're going into 'untrusted sources' to get older versions.

    Unless you explicitly need the older versions than 1.2.8-7, you should stick with the version of the package in the repos for your specific release, and not try and install a specific other version - which apt can't do if there are no other versions available in your repository sources for your codenamed release (Bionic for 18.04, Focal for 20.04, for example) (Oh, and there isn't another version available for any of the releases at this time per rmadison, except for the ones it lists per-codename.).

    Also, keep in mind that 1.2.8-7 is version 1.2.8 but with package level revisions. ALSO keep in mind that at the time of 1.2.8 it had not migrated to Python 3 support - as a result, 1.2.8 may not function on newer versions of Ubuntu because of Python 2 package deprecation and drops in Debian which trickled down to Ubuntu 20.04 and later.