RSS

Linux Tricks - Keeping your Ubuntu/Debian machines clean

Wed, Nov 15, 2006

ArsGeek, Linux, Ubuntu

Talk about it in our Forums

Clean that box

I tend to install a lot of stuff on my Ubuntu machines. Much of this I do for curiosity and then report it here. This means that not only do I get to check out lots of interesting stuff, but my machines also start getting cluttered with stale files, old versions and orphaned files.

Here are two quick ways to help clean up your system.

First, you can use a built in apt-get feature called autoclean. Open a terminal session and type:

sudo apt-get autoclean

This will rid your system of partial packages and mucked up .deb downloads and can free up a suprising amount of space.

Another great tool is a package called Deborphan. You can either install this through Synaptic or again in a terminal session type:

sudo apt-get install deborphan

Once it’s installed, you can run it to list all of your orphaned packages. Think of them as packages that no longer serve a purpose and are not needed or used on your machine. Once you get a list, you can use apt-get to remove them.

sudo deborphan | xargs sudo apt-get -y remove –purge

Now you’ve saved yourself some space.

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

8 Comments For This Post

  1. Arky Says:

    I think ‘orphaner’(a frontend to deborphan) its a neat way of getting rid of uneeded packages.

    Cheers

    –arky

  2. Aleksandersen Says:

    Thanks. Do have a look at Deleting Unwanted Files too.

  3. stevejones Says:

    I use “debfoster” to manage my packages

  4. arsgeek Says:

    Had to turn on caching due to the digg effect, so new comments may take 12 minutes to show up.

  5. elvis Says:

    instead of apt-get I use aptitude. and when I want to remove something I just type:
    sudo aptitude --purge-unused purge something

  6. arsgeek Says:

    That’s a fine method Elvis, thank you very much. Deborphan however clearly picks out orphaned packages for you, so that you can leave one more task to your computer before it finds Sarah Conner.

  7. daveg Says:

    I deal with orphaned packages, I have deporphan & wajig installed. wajig is a fantastic alternate commandline program to agt-* and dpkg. It can even handle sudo for you if the command you’re running requires it and you forgot to issue it in the command.

    Anyway, once I’ve got that, its just wajig remove-orphans

  8. arsgeek Says:

    Hi Daveg,

    Wajig sounds like a great package. I’ve just installed it and will be mucking about with it today.

3 Trackbacks For This Post

  1. ARTbird309’s Blog » Blog Archive » links for 2006-11-18 Says:

    [...] ArsGeek - Free your inner geek » Linux Tricks - Keeping your Ubuntu/Debian machines clean (tags: UBUNTU LINUX TUTORIAL Tips debian apt tip apt-get sysadmin package howto) [...]

  2. links for 2006-11-20 at Content Cowboy Says:

    [...] ArsGeek - Free your inner geek » Linux Tricks - Keeping your Ubuntu/Debian machines clean (tags: apt-get ubuntu) [...]

  3. Grub getting grubby « SwitchBuntu Says:

    [...] you’re at it, according to arsgeek all you need to do is run sudo apt-get autoclean to get rid of other cruft that’s old and no [...]

Leave a Reply