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















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!