install specific version of debian package with apt

Let’s say you have multiple version of a package that are available and you want to install a specific one.
We will use ‘mysql-server-5.0′ package for our example:

remy@r12925:~$ apt-cache policy mysql-server-5.0
mysql-server-5.0:
Installed: (none)
Candidate: 5.0.32-7etch12
Version table:
5.0.32-7etch12 0
500 http://security.debian.org etch/updates/main Packages
5.0.32-7etch8 0
500 ftp://mir1.ovh.net etch/main Packages

5.0.32-7etch5 0
100 /var/lib/dpkg/status

You want to install bolded version of mysql-server-5.0 package.
Nothing easier!!
Simply run apt with following syntax:

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

In our case, I would run “sudo apt-get install mysql-server-5.0=5.0.32-7etch8″

sources

3 Responses to “install specific version of debian package with apt”

  1. [...] Read more from the original source: install specific version of debian package with apt « Willing wheels [...]

  2. [...] more: install specific version of debian package with apt « Willing wheels Share and [...]

  3. [...] Let’s say you have multiple version of a package that are available and you want to install a specific one. More hre [...]

Leave a Reply