Skip to content

Instantly share code, notes, and snippets.

@somada141
Created March 9, 2015 02:40
Show Gist options
  • Save somada141/51b70e77f47154b625e0 to your computer and use it in GitHub Desktop.
Save somada141/51b70e77f47154b625e0 to your computer and use it in GitHub Desktop.
Install a particular version of a package with apt-get #linux #bash #shell #apt #apt-get #install

You can install a specific version of a package with apt-get in the terminal. First, determine the available versions you can install with the following command:

apt-cache showpkg <packagename>

e.g. apt-cache showpkg subversion-tools would give something like:

> Package: subversion-tools
> Versions: 
> 1.3.2-5~bpo1(/var/lib/dpkg/status)
> 1.1.4-2 (/var/lib/apt/lists/ftp.uk.debian.org_debian_dists_stable_main_binary-i386_Packages)

To install the specific version simply run run:

apt-get install <package name>=<version>

e.g. apt-get install subversion-tools=1.3.2-5~bpo1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment