Mr Ubuntu – Blog of Luke J Dixon
A Guy – His Life – His Blog

Package Installation Log

August 8th, 2008 by Luke

Right, first top tip so lets get rollin’ shall we?

This will apply to both Desktop and Server installations of Ubuntu. If you’re like me, you’ll like to tinker around with things on the OS and install and try new and exciting software (provided for free by the awesome community!). However, after a while you’ll forget about the software you’ve installed and go find some other exciting applications causing a gradual build up of old software and using up your hard drive space. If only there was a way to keep track of the software i’ve installed and when you may ask… ah! This is where i can help!

This is the code we shall use:

sudo echo -e "State \tLast change \t \tName" > $HOME/PkgLog && ls -lsrt /var/lib/dpkg/info/*.list | awk '{print $6"\t"$7" "$8"\t"$9}' | sed -e "s/\/var\/lib\/dpkg\/info\///" -e "s/.list//" -e "s/^0\t/Removed \t/" -e "s/^[0-9]*\t/Installed\t/" >> $HOME/PkgLog

The above will make a lovely tad separated list for you to examine. You could then look at what you installed and when and decided if its time to remove them from your system. Once removed just run the script again and you have an updated version.

Hope this helps someone out there as much as it helped me with this server!
Mr Ubuntu

Share and Enjoy:
  • Digg
  • Reddit
  • Facebook
  • Twitter
  • StumbleUpon
  • DZone
  • del.icio.us
  • Diigo
  • Print
  • Sphinn
  • Mixx
  • Google Bookmarks
  • FriendFeed
  • MySpace
  • Ping.fm
  • Slashdot
  • Technorati
  • email

Posted in Desktop, Server

This website uses IntenseDebate comments, but they are not currently loaded because either your browser doesn't support JavaScript, or they didn't load fast enough.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.