This question already has an answer here:
My questions are divided into two parts:
- How to know the version of installed package?
- How to install a specific package version?
|
This question already has an answer here: My questions are divided into two parts:
|
|||||
marked as duplicate by karel, Braiam, BuZZ-dEE, Richard, Florian Diesch Mar 4 '14 at 23:35This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. |
|||||
|
|||||
How to know the version of installed package?
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 How to install a specific package version?
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. |
|||||||||||||||||||||
|
|
There is no general way to check the version of installed packages, but most of them can be checked using the command:
for example to know the version of apache2:
But this may not work with other packages so the best practice is to search the manual.
and search for the option of showing the version. To install a specific version of a package:
For example:
|
||||