Skip to content

Instantly share code, notes, and snippets.

@haisum
Created May 9, 2017 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haisum/a2f7a1e0a057c6e21126a33d4cefcb60 to your computer and use it in GitHub Desktop.
Save haisum/a2f7a1e0a057c6e21126a33d4cefcb60 to your computer and use it in GitHub Desktop.
Selecting specific yum package version
To see what particular versions are available to you via yum you can use the --showduplicates switch.
$ yum --showduplicates list httpd | expand
Loaded plugins: fastestmirror, langpacks, refresh-packagekit
Loading mirror speeds from cached hostfile
* fedora: mirror.steadfast.net
* rpmfusion-free: csc.mcs.sdsmt.edu
* rpmfusion-free-updates: csc.mcs.sdsmt.edu
* rpmfusion-nonfree: csc.mcs.sdsmt.edu
* rpmfusion-nonfree-updates: csc.mcs.sdsmt.edu
* updates: mirror.steadfast.net
Available Packages
httpd.x86_64 2.4.6-6.fc20 fedora
httpd.x86_64 2.4.10-1.fc20 updates
As far as installing a particular version? You can append the version info to the name of the package like so:
$ sudo yum install <package name>-<version info>
For example in this case if I wanted to install the older version, 2.4.6-6 I'd do the following:
$ sudo yum install httpd-2.4.6-6
You can also include the release info when specifying a package. In this case since I'm dealing with Fedora 20 (F20) the release info would be "fc20", and the architecture info too.
$ sudo yum install httpd-2.4.6-6.fc20
$ sudo yum install httpd-2.4.6-6.fc20.x86_64
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment