RSS



How to get package info (including version and dependancies) on just about anything in Ubuntu

Thu, Sep 25, 2008

Linux, Technology, Ubuntu

Talk about it in our Forums

How to get package info (including version and dependancies) on just about anything in Ubuntu

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: , , , , , ,

Click the icon, share the link:
  • Digg
  • del.icio.us
  • MisterWong
  • Furl
  • Reddit
  • Technorati
  • BlinkList
  • feedmelinks
  • PopCurrent
  • Blogosphere News
  • Facebook
  • Fark
  • Mixx
  • Slashdot
, , , , , ,

This post was written by:

arsgeek - who has written 1980 posts on ArsGeek.


Contact the author

6 Comments For This Post

  1. Dotan Cohen Says:

    Nice, thanks! Although I’ve never needed this info, it is good to know that Ubuntu makes it easy to find.

  2. Felix Says:

    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).

  3. jher Says:

    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…

  4. Kyle Says:

    I like this command it shows the installed version vs. the available update version:

    $ apt-cache policy samba

  5. how to crack PSP Says:

    I just started using Ubuntu and this post has helped. Thanks for sharing it.

  6. Cognitive Enhancement Blog Says:

    I love Ubuntu! Thanks!

Leave a Reply