24

I've upgraded Ubuntu on my laptop all the way from 7.04 to 10.04 without ever wiping the disk. I have a sneaking suspicion that means I have a bunch of crufty packages that I don't use and that are just taking up disk. Is there any way to get a list of all the packages included that are beyond the base install?

10

After doing a little googling I came up on this link : http://ubuntuforums.org/showthread.php?t=261366

Basically he uses

dpkg --get-selections > installed-software

to list all the installed packages , now if you can get a list from someone who just installed ubuntu or get it from a fresh VM install and compare the list you have the packages that are not in the vanilla install.

Also if you just want to remove unused packages use the janitor ( System > Administration > Compter Janitor) :-)

8

The debfoster and deborphan packages are very useful for this purpose. You can do

$ deborphan

to get a list of libraries that have no package depending on them. You often get extra libraries left behind after an upgrade. You can also do

$ deborphan -a

to see all packages that have no other packages depending on them. Some of them you will have installed yourself, but any you don't recognise you could check the details and uninstall if they seem unnecessary.

Meanwhile debfoster will go through the packages and show you what packages and keeping lower level packages installed. This is a bit more dangerous if you don't know what you're doing, and has to be run as root or using sudo.

  • 1
    deborphan is a very useful tool, but I would highly recommend checking each package that it gives you before removing it. – fouric Nov 4 '13 at 5:48
2

This lists all installed packages, stripping out those which were automatically installed:

aptitude search '~i!~E' | grep -v "i A" | cut -d " " -f 4

It's probably the closest thing to what you want. It'll still include libraries which were pulled in as dependencies of packages, but it won't contain any of the packages in the default system.

  • 2
    I just tried this and it included lots of packages that are in the default system. I wouldn't use this as the way to find unused packages. – Hamish Downer Jul 29 '10 at 14:06
1

I found a great answer to this on a related question. It uses the release manifest for the default package install list.

I also found this duplicate question.

I would love to see this as a filter in the Ubuntu Software Center. In Windows "Add/Remove Programs" serves this purpose.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.