Do you know how to find out what version of SSH is running on your Ubuntu box? How about what version of apt? Would you like to see what certain packages depend on to run? Or find the MD5 hash for already installed packages?
There’s one easy command you can type to get you this info, and more.
Let’s say you have SSH installed and you want to know all about it. Type:
sudo apt-cache showpkg ssh | less
You should see a whole bunch of info, starting with the version of SSH you’re currently running and ending with dependancies.
Technorati Tags: linux, ubuntu, package info, how to, howto, version, dependencies
Popularity: 4% [?]












September 25th, 2008 at 4:59 pm
Nice, thanks! Although I’ve never needed this info, it is good to know that Ubuntu makes it easy to find.
September 26th, 2008 at 5:26 am
Check out wajig [1][2], a “single commandline wrapper around apt, apt-cache, dpkg, /etc/init.d scripts and more, intended to be easy to use and providing extensive documentation for all of its functions.”
I especially use commands like
wajig search
wajig show
wajig install
[1] http://debaday.debian.net/2007/03/18/wajig-simplified-debian-administration-front-end/
[2] http://www.togaware.com/linux/survivor/Wajig_Overview.html
Be sure to install python-optcomplete to get command-line completion for wajig (and thus all available packages for your system).
October 6th, 2008 at 4:03 pm
better to leave off the “|less” as it throws one into a shell escape where you cannot enter the sudo password to run the command…
December 6th, 2009 at 10:02 pm
I like this command it shows the installed version vs. the available update version:
$ apt-cache policy samba
April 8th, 2010 at 4:36 pm
I just started using Ubuntu and this post has helped. Thanks for sharing it.
May 19th, 2010 at 1:52 pm
I love Ubuntu! Thanks!
September 26th, 2010 at 10:07 pm
mason0507 ww
January 6th, 2011 at 12:39 am
gooooooooood effort
February 18th, 2011 at 9:16 am
Thank you very much for this post!
March 30th, 2011 at 2:39 am
I enjoyed reading your blog & I must congratulate you.. this is a work of art!
June 11th, 2011 at 6:16 am
Child health programs is almost certain to increase deficits.
July 9th, 2011 at 2:43 pm
This is really a good web internet site. Good fresh user interface and good educational weblogs. I will be returning soon, thanks for the wonderful blog. Even though these possess a strap to keep child within place while you’re altering them, you ought to by no means child unwatched when the pad is not strapped in order to something.