Debian Admin - Your way to Debian World

November 11, 2006

List your installed package versions with apt-show-versions

by @ 7:12 pm. Filed under Package Mgmt

If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!

apt-show-versions parses the dpkg status file and the APT lists for the installed and available package versions and distribution and shows upgrade options within the specific distribution of the selected package.

This is really useful if you have a mixed stable/testing environment and want to list all packages which are from testing and can be upgraded in testing.

apt-show-versions uses caching for the status information of installed and available packages. If you run apt-show-versions as root the cache is updated as needed. If you run as non-root uses the newest available information, but can’t update the cache. If you run as root with the option -i the cache is initialized or updated only.

Install apt-show-versions in Debian

#apt-get install apt-show-versions

Install apt-show-versions in Ubuntu

sudo apt-get install apt-show-versions

Examples

If you want to run this command from the command line

#apt-show-versions

output looks like below

libdb1-compat/testing uptodate 2.1.3-9
libhtml-mason-perl/testing uptodate 1:1.33-2
libmailtools-perl/testing uptodate 1.74-0.1
libfile-scan-perl/testing uptodate 1.43-1
liborbit2/testing upgradeable from 1:2.14.0-2 to 1:2.14.3-0.1
discover1/testing uptodate 1.7.18
auto-apt/testing uptodate 0.3.21
mutt/testing uptodate 1.5.13-1
egroupware-phpsysinfo/testing upgradeable from 1.2-104.dfsg-3 to 1.2-105.dfsg-2
libssl0.9.8/testing upgradeable from 0.9.8b-3 to 0.9.8c-3
libgtk2.0-0/testing upgradeable from 2.8.20-1 to 2.8.20-3

If you want to see available upgraded you need to use -u option

#apt-show-versions -u

output looks like

ruby1.8/testing uptodate 1.8.5-3
bsdmainutils/testing uptodate 6.1.4
libtime-modules-perl/testing uptodate 2003.1126-2
slang1a-utf8 1.4.9dbs-8 installed: No available version in archive
tmpreaper/testing uptodate 1.6.6
eject/testing uptodate 2.1.4-2.1
ssh/testing upgradeable from 1:4.3p2-3 to 1:4.3p2-5

To get a list of all available versions of libc6

#apt-show-versions -a -p libc6

To upgrade all packages in testing:

#apt-get install ‘apt-show-versions -u -b | fgrep testing’

If you want to know more available options for apt-show-versions check man page

Tags: , , , , ,

You may also be interested in...

2 Responses to “List your installed package versions with apt-show-versions”

  1. Arky Says:

    The last command that let’s you upgrade all the packages in testing doesn’t work. I think we should enclose the whole ‘apt-show-versions -u -b | fgrep testing’ part in command substitutions quotes/ticks (`).

    Cheers

    –arky

  2. Admin Says:

    you are right and i have updated the article thanks

Leave a Reply

Subscribe RSS Feed

subscribe to the Debian Admin RSS feed

Internal links:

Sponsors:



Categories:

Support Debian Admin

Amount $:
Website(Optional):

Sponsors:

Archives:

Related Links:


Favourite Sites:

Wordpress Collection
Windows Reference
Ubuntu Geek
DebianHelp
All About Debian Tutorials
Power Electrical
Check Your IP Here
Debian,Ubuntu News
DebCentral
Tuxmachines
Capnkirby
Libervis
Nuxifield
Linux Horizon
Linux Appfinder
Debuntu
GNU/Linux For Everyone
Free Penguin
DebianAdmin is not related to the Debian Project.
This site is copyright © 2006,2007 Debian Admin
All Trademarks are the property of their respective owners.
The contents of this website may not be mirrored or archived without the express written permission of DebianAdmin Site Owner.

DISCLAIMER: All the information, troubleshooting methods, utilities offered in this website is provided AS-IS, without any warranties. Though I strive for perfection, and always test the validity and effectiveness of the troubleshooting content in various systems, I assume no responsibility for your use of these Fixes, Utilities and other troubleshooting advice. The author will not be liable for any special, incidental, consequential or indirect damages due to loss of data or any other reason. All use is completely at your own risk. Changes to the existing content and new additions are made to this website periodically, without notification.
Rodney's Kontera DynamiContext Plugin plugged in.