How to install specific version of some package on Linux?
Quote from HeelpBook on August 19, 2018, 9:28 amThese question could be divided into two parts:
How to know the version of installed package on Linux system?
How to install a specific package version?
These question could be divided into two parts:
How to know the version of installed package on Linux system?
How to install a specific package version?
Quote from HeelpBook on August 19, 2018, 9:31 am
apt-cache policy <package name> The above command will shows installed package version and also all the available versions in the repository according to the version of Ubuntu in which you are running.It doesn't display the package version which was intended for another version of Ubuntu(not your's).
Example:
$ apt-cache policy gparted
gparted:
Installed: 0.16.1-1
Candidate: 0.16.1-1
Version table:
*** 0.16.1-1 0
500 http://ubuntu.inode.at/ubuntu/ saucy/main amd64 Packages
100 /var/lib/dpkg/statusSo the installed gparted version is 0.16.1-1.
How to install a specific package version?
sudo apt-get install <package name>= Example:
$ sudo apt-get install gparted=0.16.1-1
Reading package lists... Done
Building dependency tree
Reading state information... Done
gparted is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 265 not upgraded.
apt-cache policy <package name> |
The above command will shows installed package version and also all the available versions in the repository according to the version of Ubuntu in which you are running.It doesn't display the package version which was intended for another version of Ubuntu(not your's).
Example:
$ apt-cache policy gparted gparted: Installed: 0.16.1-1 Candidate: 0.16.1-1 Version table: *** 0.16.1-1 0 500 http://ubuntu.inode.at/ubuntu/ saucy/main amd64 Packages 100 /var/lib/dpkg/status |
So the installed gparted version is 0.16.1-1.
How to install a specific package version?
sudo apt-get install <package name>= |
Example:
$ sudo apt-get install gparted=0.16.1-1 Reading package lists... Done Building dependency tree Reading state information... Done gparted is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 265 not upgraded. |