Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
    
@Alaa yeah its ok and seems to be that will expand the part. Thank you for the edit. –  AgentCool Sep 3 '13 at 1:24

5 Answers 5

up vote 54 down vote accepted

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.

share|improve this answer

Go to packages.ubuntu.com, fill in the search form and get a nice view of the package including the version.


enter image description here


Hit search, then:


enter image description here


Additional benefits

  • Will also list versions of packages for other versions of Ubuntu. Eg. if you want to know about the version of the package in Raring (13.04), but your system still has Precise (12.04), then this will provide a way to find it out.
  • You don't even need Ubuntu to be installed.

Biggest downside is that it won't list the versions of other repositories you possible have installed, such as PPAs. You will then need the apt-cache policy approach as already posted.

Pro tip

Take the shortcut - just browse to http://packages.ubuntu.com/packagename and replace packagename with the name of the package you want to query.

share|improve this answer

Open your terminal with CTRL+ALT+T and then type as

apt-cache showpkg <package_name>

Then it will give you information about whats the available version.

for example:

jai@frank-Jai:~$ apt-cache showpkg chromium
Package: chromium
Versions: 

Reverse Depends: 
  mozplugger,chromium 10.0.648.114~r75702-1~
  chromium-bsu,chromium 0.9.14
  chromium-bsu,chromium 0.9.14
Dependencies: 
Provides: 
Reverse Provides: 
jai@frank-Jai:~$ 
share|improve this answer
1  
As far as I know, there is no such a package named only "chromium". Therefore apt-cache show is more practical in this sense. –  Radu Rădeanu Sep 2 '13 at 19:52
    
@RaduRădeanu chromium is a browser. –  AgentCool Sep 5 '13 at 15:06
    
Yes, you have right, but the name of the package is chromium-browser. You can check with apt-cache search chromium. It's the 5th line from the output :) –  Radu Rădeanu Sep 5 '13 at 15:15

apt-cache show or aptitude show gives you a lot of information about a package from your repositories (even if this is installed or not), including the version. If you are interested only about version, use:

apt-cache show <packageName> | grep Version

or

aptitude show <packageName> | grep Version

If a package is available in several versions, you will see this. To see only the last version, use:

apt-cache show <packageName> | grep Version | head -1

You can not have any doubts with the above command.

share|improve this answer

Another one,

apt-cache madison <packageName>

It also gives information about all avilabe package verions in the repositories.This command output had the syntax like below,

packageName | Verion | Repository
madison pkg...
           apt-cache's madison command attempts to mimic the output format and a subset of the
           functionality of the Debian archive management tool, madison. It displays available
           versions of a package in a tabular format. Unlike the original madison, it can only
           display information for the architecture for which APT has retrieved package lists
           (APT::Architecture).

Example:

avi@avi-Lenovo-IdeaPad-Z500:~$ apt-cache madison chromium-browser

chromium-browser | 32.0.1700.102-0ubuntu0.13.10.1~20140128.970.1 | http://mirror.sov.uk.goscomb.net/ubuntu/ saucy-updates/universe amd64 Packages
chromium-browser | 32.0.1700.102-0ubuntu0.13.10.1~20140128.970.1 | http://mirror.sov.uk.goscomb.net/ubuntu/ saucy-security/universe amd64 Packages
chromium-browser | 29.0.1547.65-0ubuntu2 | http://mirror.sov.uk.goscomb.net/ubuntu/ saucy/universe amd64 Packages
chromium-browser | 29.0.1547.65-0ubuntu2 | http://archive.ubuntu.com/ubuntu/ saucy/universe amd64 Packages
chromium-browser | 29.0.1547.65-0ubuntu2 | http://mirror.sov.uk.goscomb.net/ubuntu/ saucy/universe Sources
chromium-browser | 32.0.1700.102-0ubuntu0.13.10.1~20140128.970.1 | http://mirror.sov.uk.goscomb.net/ubuntu/ saucy-updates/universe Sources
chromium-browser | 32.0.1700.102-0ubuntu0.13.10.1~20140128.970.1 | http://mirror.sov.uk.goscomb.net/ubuntu/ saucy-security/universe Sources
chromium-browser | 29.0.1547.65-0ubuntu2 | http://archive.ubuntu.com/ubuntu/ saucy/universe Sources
chromium-browser | 29.0.1547.65-0ubuntu2 | http://archive.ubuntu.com/ubuntu/ saucy/universe Sources
share|improve this answer
    
Nice , Thank you for answering .:) –  AgentCool Feb 12 at 8:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.