How to Install Specific Package Version in Linux Mint
In this brief tutorial, we'll see how to list available Ubuntu packages and install exact version in Linux Mint.
Step 1: List the available versions of a package in the repositories
To start, let's list all available versions for a package in the repositories. This can be done in several ways:
1.1 List all repository packages with apt list -a
The first option to list all available Ubuntu packages is command (again for package chromium-browser):
apt list -a chromium-browser
The output is:
Listing... Done
chromium-browser/bionic-updates,bionic-security,now 86.0.4240.75-0ubuntu0.18.04.1 amd64 [installed]
chromium-browser/bionic 65.0.3325.181-0ubuntu1 amd64
again we can see that two versions are available. [installed]
marks the packages which are installed on your system.
1.2 List all versions by apt-cache show and grep
Linux Mint offers many different ways to get similar information. In this case we will combine two commands in order to get only the information which is interesting for us - available versions for Ubuntu package - chromium-browser:
apt-cache show chromium-browser | grep Version
output:
Version: 86.0.4240.75-0ubuntu0.18.04.1
Version: 65.0.3325.181-0ubuntu1
1.3 Search the Ubuntu repositories
Check repositories with madison
:
apt-cache madison chromium-browser
result:
chromium-browser | 86.0.4240.75-0ubuntu0.18.04.1 | http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
chromium-browser | 86.0.4240.75-0ubuntu0.18.04.1 | http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages
chromium-browser | 65.0.3325.181-0ubuntu1 | http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
The format of the output is:
packageName | Version | Repository
1.4 View available packages with apt-cache policy
Another option is to use apt-cache policy <package>
- for example checking chromium-browser:
apt-cache policy chromium-browser
the output is the following:
chromium-browser:
Installed: (none)
Candidate: 86.0.4240.75-0ubuntu0.18.04.1
Version table:
*** 86.0.4240.75-0ubuntu0.18.04.1 500
500 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages
500 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages
100 /var/lib/dpkg/status
65.0.3325.181-0ubuntu1 500
500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
where:
- Installed - is the current installed version or if the package is not installed on your system - (none)
- Candidate - is the version which will be installed from the repositories by
apt-get install chromium-browser
- two versions are available:
86.0.4240.75-0ubuntu0.18.04.1
and65.0.3325.181-0ubuntu1
1.5 Search the Ubuntu repositories
The final way to check for packages is by searching the repositories. This can be done in next process:
- Visit: Ubuntu Packages Search
- In keyword field enter the package name:
chromium-browser
Step 2: Install specific package version in Linux Mint
Once we checked the available packages and which version we like to install then we can move to installation. By default if you run command like:
apt-get install chromium-browser
will install the Candidate Version (you can check which is the candidate by apt-cache policy
)
So in order to install different version from the latest one you can do:
apt-get install chromium-browser=65.0.3325.181-0ubuntu1
or for eclipse:
apt-get install eclipse=3.8.1-11
Step 3: Confirm installed package version with dpkg
The final step is to confirm which version of the package is installed( this can be done also in step 1). In this step we will see another way of checking the same information. Let's check which is the installed version of chromium-browser
:
dpkg -l 'chromium-browser' | grep ^i
In the output we can find:
ii chromium-browser 86.0.4240.75-0ubuntu0.18.04.1 amd64 Chromium web browser, open-source version of Chrome
than current installed version is: 86.0.4240.75-0ubuntu0.18.04.1
Resources
Depending on the package installation steps might be different. Here you can find some interesting examples related to such exceptions: