2

For example, running apt-cache show bash shows info of the bash package for version: 5.0-6ubuntu1.1 as it is latest.

How to specify the command for an older version, let's say bash package with version: 4.3-6ubuntu1? If not possible with apt-cache show, are there any other commands for this?

2 Answers 2

2

apt-cache only shows current server information (updated via apt update or apt-get update) of existing packages in the repository. What a package is updated, it replaces older versions of the package unless that version is required by another suite.

When I search Ubuntu for bash, I see these versions:

    xenial (16.04LTS) 4.3-14ubuntu1.4
    xenial-updates    4.3-14ubuntu1.4
    bionic (18.04LTS) 4.4.18-2ubuntu1
    bionic-updates    4.4.18-2ubuntu1.2
    focal (20.04LTS)  5.0-6ubuntu1
    focal-updates     5.0-6ubuntu1.1
    groovy (20.10)    5.0-6ubuntu2
    hirsute           5.1-2ubuntu1

If you want to apt-cache to show you information about several versions of bash, you'll need to add the relevant suites to your /etc/apt/sources.list, then apt update. This will give apt-cache information about the versions available in other suites. Then use apt show -a bash to see the information about all packages.

In debian testing, man apt-cache says that -a is the default behaviour, but this might be a mistake because I find that I need to explicitly specify -a, or I'll only see the most recent (or locally installed) version and a little message that says something like "there are more versions available, use -a to see them"

1

Using apt changelog bash command, it will display the changes in the packaged versions, this includes modifications made during of the package developpement.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .