December 21, 2007 · Package Mgmt · Email This Post

Sponsored Link
It's worthwhile to do this every now again again on your ubuntu box when you've been installing and uninstalling new apps. This will go through and check which packages have been installed that are no longer needed. It will then remove them for you

apt-get autoremove

Output looks like below

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libcommoncpp2-1.5.3-0
The following packages will be REMOVED
libcommoncpp2-1.5.3-0
0 upgraded, 0 newly installed, 1 to remove and 29 not upgraded.
Need to get 0B of archives.
After unpacking 688kB disk space will be freed.
Do you want to continue [Y/n]?

Here you need to select Y to remove these packages

Incoming search terms:

Related posts

5 Comments to “Howto Clean up your packages”

  1. Kevin says:

    Or just use aptitude when you add and remove programs instead of apt-get… it will mark packages that were installed as dependencies and when you remove a package it will also clean up the dependencies.

    [Reply]

  2. Scott says:

    I don’t like using aptitude because it defaults to automatically installing all -suggested- packages along with the dependencies, which is very rarely to never what I want to do. I don’t want any extra stuff installed, only what’s necessary.

    Package dependencies are required by other packages in most cases anyway (isn’t that the whole point of using common libraries?), and even after years of apt-get installing and removing, very little cruft seems to build up. Not enough to worry about having to clean it up, maybe a handful of packages.

    [Reply]

  3. Fergus says:

    Are there any other ways of cleaning up more space? I’ve done apt-get autoremove and I’m still using 94% of diskspace

    [Reply]

  4. Kouakou says:

    be careful with the autoremove, it may remove stuff that you do need….I found it out the hard way

    [Reply]

  5. UnklFungus says:

    Yeah, I have used autoremove before without any problems. I used it last night and Ubuntu is basically gone. But, hey, who needs 50gb of precious family pictures anyway…

    [Reply]

Leave a Reply