Linux apt package version

How can I see all versions of a package that are available in the archive?

Is there a way I can see all the versions that are in the archives that I have configured in sources.list. I can see the last version of each archive with apt-get policy , but how can I see them all? Is there any way that this can also include PPA and anything in sources.list.d?

5 Answers 5

As far as I understand your requirements, the madison option for apt-cache does what you want:

madison /[ pkg(s) ]
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).

$ apt-cache madison f-spot f-spot | 0.7.2-1~ppa~lucid0 | http://ppa.launchpad.net/f-spot/f-spot-ppa/ubuntu/ lucid/main Packages f-spot | 0.6.1.5-2ubuntu7 | http://ro.archive.ubuntu.com/ubuntu/ lucid-updates/main Packages f-spot | 0.6.1.5-2ubuntu6 | http://ro.archive.ubuntu.com/ubuntu/ lucid/main Packages f-spot | 0.6.1.5-2ubuntu6 | http://ro.archive.ubuntu.com/ubuntu/ lucid/main Sources f-spot | 0.6.1.5-2ubuntu7 | http://ro.archive.ubuntu.com/ubuntu/ lucid-updates/main Sources 

I hope this is what you need. It also includes the ppas.

The command apt list -a is the equivalent of madison.

Ancient Unix lingo really needs to die. In the modern day, we should be focused on user experience. The concept of a geeky «sysadmin» is antiquated and no longer relevant.

is the equivalent of madison.

Can second, I like the output this command produces. I just want to know the version numbers available to me, I don’t need all the additional information and warnings and messaging.

The rmadison program from the devscripts package will remotely query the Ubuntu archive and give you the status of a package in all supported releases, not only those you have locally insatlled. This is slightly more than what you want, but should get the job done easily.

lfaraone@stone:~$ rmadison sudo sudo | 1.6.8p12-1ubuntu6 | dapper | source, amd64, i386, powerpc sudo | 1.6.8p12-1ubuntu6.3 | dapper-security | source, amd64, i386, powerpc sudo | 1.6.8p12-1ubuntu6.3 | dapper-updates | source, amd64, i386, powerpc sudo | 1.6.9p10-1ubuntu3 | hardy | source, amd64, i386 sudo | 1.6.9p10-1ubuntu3.8 | hardy-security | source, amd64, i386 sudo | 1.6.9p10-1ubuntu3.8 | hardy-updates | source, amd64, i386 sudo | 1.6.9p17-1ubuntu3 | jaunty | source, amd64, i386 sudo | 1.6.9p17-1ubuntu3.3 | jaunty-security | source, amd64, i386 sudo | 1.6.9p17-1ubuntu3.3 | jaunty-updates | source, amd64, i386 sudo | 1.7.0-1ubuntu2 | karmic | source, amd64, i386 sudo | 1.7.0-1ubuntu2.4 | karmic-security | source, amd64, i386 sudo | 1.7.0-1ubuntu2.4 | karmic-updates | source, amd64, i386 sudo | 1.7.2p1-1ubuntu5 | lucid | source, amd64, i386 sudo | 1.7.2p1-1ubuntu5.1 | lucid-security | source, amd64, i386 sudo | 1.7.2p1-1ubuntu5.1 | lucid-updates | source, amd64, i386 sudo | 1.7.2p7-1ubuntu1 | maverick | source, amd64, i386 

before you can use rmadison you must install the devscripts package:

sudo apt-get install devscripts 

Very nice! But it also doesn’t show unsupported packages, which are still available at old-releases.ubuntu.com I’ve asked about that at Information on package versions from old releases? — Ask Ubuntu — Stack Exchange

Читайте также:  Указать прокси для linux

rmadison ffmpeg currently shows 14 lines of results, including «7:4.1.3-0ubuntu1», which is what I’m interested in ( launchpad.net/ubuntu/+source/ffmpeg/7:4.1.3-0ubuntu1 ) But then sudo apt install ffmpeg=7:4.1.3-0ubuntu1 results in: «Reading package lists. Done Building dependency tree Reading state information. Done E: Version ‘7:4.1.3-0ubuntu1’ for ‘ffmpeg’ was not found»

I don’t know how (or why) you said apt-cache policy doesn’t show all versions! I’m using this for several years now and It always showed all versions including the priority number.

Output of apt-cache policy nautilus

nautilus: Installed: 1:3.18.5-0ubuntu1~xenial1 Candidate: 1:3.18.5-0ubuntu1~xenial1 Version table: *** 1:3.18.5-0ubuntu1~xenial1 500 500 file:/media/Linux/apt-repo/xenial1 Packages 500 http://ppa.launchpad.net/budgie-remix/ppa/ubuntu xenial/main amd64 Packages 500 http://ppa.launchpad.net/gnome3-team/gnome3/ubuntu xenial/main amd64 Packages 100 /var/lib/dpkg/status 1:3.18.4.is.3.14.3-0ubuntu5 500 500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages 1:3.18.4.is.3.14.3-0ubuntu4 500 500 file:/media/Linux/apt-repo/xenial1 Packages 500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages 1:3.14.2-0ubuntu13 500 500 file:/media/Linux/apt-repo/wily Packages 

Output of apt-cache madison nautilus

 nautilus | 1:3.18.5-0ubuntu1~xenial1 | file:/media/Linux/apt-repo/xenial1 Packages nautilus | 1:3.18.5-0ubuntu1~xenial1 | http://ppa.launchpad.net/budgie-remix/ppa/ubuntu xenial/main amd64 Packages nautilus | 1:3.18.5-0ubuntu1~xenial1 | http://ppa.launchpad.net/gnome3-team/gnome3/ubuntu xenial/main amd64 Packages nautilus | 1:3.18.4.is.3.14.3-0ubuntu5 | http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages nautilus | 1:3.18.4.is.3.14.3-0ubuntu4 | file:/media/Linux/apt-repo/xenial1 Packages nautilus | 1:3.18.4.is.3.14.3-0ubuntu4 | http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages nautilus | 1:3.14.2-0ubuntu13 | file:/media/Linux/apt-repo/wily Packages 

Only difference is that madison took some more time than policy and shorter version. But, policy is more useful to see which version get installed, which version is next candidate to be installed.

That’s why I’d suggest always using apt-cache policy instead.

Note about output: I have some local repository setup and both of the command shows those as well.

Note 2 Newer apt comes with policy integrated into them. So, you can use apt instead of apt-cache directly.

Источник

How to install specific version of some package? [duplicate]

Please do not vote to delete this post. It is useful as a signpost. Duplicates serve to guide others to the right Q&A.

Читайте также:  Linux bash change user

2 Answers 2

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 0.16.1-1 .

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. 

In every case I’ve ever tried this I always get the error The following packages have unmet dependencies: , followed by a list of packages. Any way to make it resolve that automatically?

Please note that it will most likely fail, because there is usually only 1 or 2 versions of the package that are available in the repository. If you want a different version than currently designed for your distribution, you might need to download it and install with sudo dkpg -i . Dependency errors need to be resolved by downloading and installing (also with dkpg ) all missing packages (this can take many iterations). Alternatively you can download the program source code, compile it and install it (this also requires manual dependency resolution).

Источник

Check Available Version of a Package in Ubuntu

There are several ways to determine the version number of an available package in Ubuntu. The command line provides quick access to the available packages in Ubuntu. In this article, we will see how to check the available version of the package in Ubuntu from the command line.

We will explain different methods in this section of checking the Ubuntu package’s available version.

Always make sure to update your system as per the latest version available. So, execute the below command for it:

Now, run the below command to check the available version of the Ubuntu package:

Here, we want to check the available version of firefox using apt-get list available packages. That’s why we have executed the below command:

As the above result suggests, we can use ‘-a’ to get the additional version-related information. So we have executed the following command:

If you need more details about the available package, then use the following command:

Читайте также:  Access serial device linux

Apt Cache Command

If you want to query the APT cache, then please use this command. Apt-cache command gives an operation to find and create appropriate output from the available package metadata. So, run the below command for it:

For example, we will find out all the available versions of the Firefox web browser from the Ubuntu repository. For this, we get the command run by writing “firefox” instead of “package name” in the above command.

After executing the above command, the system will provide brief details on the available version of the Firefox web browser. Along with this, this command also tells us from which repository this version is coming. The output also provides information on whether the package is installed.

In the above image, there are two words named candidate and install.

Installed

It shows us the version which is currently installed in the Ubuntu system.

Candidate

The candidate shows the package of that version in our Ubuntu system, which is to be installed. This example shows the version that we will install the Firefox browser from the Ubuntu repository using apt-get.

Through another command, we can display the package version from the Ubuntu repository. This command is something like this.

To display the version on the repository, we will run a command like this.

If we compare with the previous command, then this command displays the output in a clean format.

Aptitude Command

Ubuntu doesn’t offer aptitude, so please install it through this command:

Now, check the available version of Firefox using the command given below:

Bonus Tip

This method applies specifically to Ubuntu desktops. Visit the Ubuntu packages website using any web browser. Press the search button after entering the name of the package version.

That’s all we need to do. This will display the installation package version available in the Ubuntu repository.

Wrapping Up

This was a brief overview of how to check the available versions of a package in Ubuntu from the command line. We have used specific examples of the Firefox browser so that our readers can understand better. Please visit our official website to learn more new things about Linux.

About the author

Prateek Jangid

A passionate Linux user for personal and professional reasons, always exploring what is new in the world of Linux and sharing with my readers.

Источник

Оцените статью
Adblock
detector