Saturday, May 4, 2024
455
rated 0 times [  455] [ 0]  / answers: 1 / hits: 428632  / 1 Year ago, sat, march 18, 2023, 9:48:53

How can I check the version of the available package in the Ubuntu repositories without installing it?


More From » package-management

 Answers
5

Use the command:



apt-cache policy <packageName>


This gives you information of all available package versions.



Example:




alaa@aa-lu:~$ apt-cache policy vlc
vlc:
Installed: 2.0.8-0ubuntu0.13.04.1
Candidate: 2.0.8-0ubuntu0.13.04.1
Version table:
*** 2.0.8-0ubuntu0.13.04.1 0
500 http://ae.archive.ubuntu.com/ubuntu/ raring-updates/universe i386 Packages
500 http://security.ubuntu.com/ubuntu/ raring-security/universe i386 Packages
100 /var/lib/dpkg/status
2.0.6-1 0
500 http://ae.archive.ubuntu.com/ubuntu/ raring/universe i386 Packages



  • From the output, you can see that there are two versions available: 2.0.8-0ubuntu0.13.04.1 and 2.0.6-1. It also tells you which repositories they are coming from.


  • Installed: tells you the version you have installed. If you don't have the package installed, you'll see (none).


  • Candidate: is the version that will be installed if you use apt-get install vlc. If you want to install the other version, you would do apt-get install vlc=2.0.6-1.



[#29641] Saturday, March 18, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
feeous

Total Points: 102
Total Questions: 122
Total Answers: 119

Location: Netherlands
Member since Thu, Jul 1, 2021
3 Years ago
;