CentOS: install a specific version of a package
List available versions with yum --showduplicates and install a specific package version on CentOS/RHEL.
1 min read
Updated
Summarise this page with
your favorite AI assistant
On CentOS and RHEL, yum installs the newest available version by default. The trick is to list the available versions with --showduplicates and then install the exact build you want. The commands are shown below.
Source: https://linoxide.com/linux-how-to/install-specific-version-packages-rhel-centos-7/
YUM.md
markdown
First, list versions available for a package:
```sh
yum --showduplicates list unixodbc
# output:
Loaded plugins: fastestmirror, ovl
Loading mirror speeds from cached hostfile
* base: mirrors.coreix.net
* epel: mirrors.uni-ruse.bg
* extras: repo.uk.bigstepcloud.com
* updates: mirror.sov.uk.goscomb.net
Available Packages
unixODBC.i686 2.3.1-14.el7 base
unixODBC.x86_64 2.3.1-14.el7 base
```
Then install the desired version:
```sh
yum install unixODBC-2.3.1-14.el7.x86_64
```Something wrong or want to discuss this article?
Get in touch