0

From an older query I found that sudo apt-get autoremove should be used. I did that and some packages got removed.

But the applications Computer Janitor and Pitivi are still present on the computer (these are not supposed to be in 11.10 from what I read), which made me wonder whether there are other unnecessary packages or old apps still present.

Is there any way to clear up these applications and packages?

1

4 Answers 4

1

The packages that were meant to be removed where removed. However, some applications were left because users may actually use them or need them. GIMP, for example, was replaced with Pitivi some time ago, but that doesn’t mean I should have to reinstall it every time I upgrade.

In other words, the fact that a package is no longer in the default selection of Ubuntu apps is no reason to automatically remove it on upgrade.

You can also remove apps by hand. This may be especially needed for Computer Janitor, because it may delete something that is actually necessary. Handle it with care if you keep it.

1
  • Thanks for the reply. Yes. That's why I didn't use computer janitor. My doubt was whether Ubuntu had left packages that were not upgraded but are also not necessary, that are possibly unused. I wanted to know how I could determine if these were present and how to remove them. Oct 16, 2011 at 8:54
1

I ran into various issues with not totally "cleaned" systems especially after upgrades as asked in this question. I hope this "more thorough cleaning" might help more than just me.

In my case I had a Server that started on 12.04 and went through various ppa's and ups/downs and experiments - after upgrading to 14.04 I fixed stuff the hard way - but after my upgrade to 16.04 this week a lot of things didn't work properly (like input on X11 at all).

To clean up and get rid of a lot without really reinstalling the machine I did the following:

First I wanted to get rid of old ppas, especially in case they still would overwrite even the newer packages Other than just apt-add-repository -r this also tries to revert to the original See this for more: Difference between "ppa-purge" and "add-apt-repository -r"?

$ ppa-purge "ppaname"

Next I got a list of all "manual" installed packages

$ comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u) > manual.txt

Clean up in this file, remove all packages from this list that you would like to keep

$ vim manual.txt

Then set all these packages from manual to auto installed

$ while read p; do sudo apt-mark auto ${p}; done <manual-to-remove.txt 

This put a lot into the next autoremove, all desktops I ever tried I recognized a lot of the experiments I did the last years. But other than hard removing them I could be sure that everything still needed by dependencies still woudl be fine.

$ sudo apt-get autoremove

If you are really willing to clean up add --purge to the autoremove - this will remove all conffiles that are associated. Be careful if you are unsure if you want to keep anything.

E voila: 0 upgraded, 0 newly installed, 1359 to remove and 0 not upgraded. After this operation, 3.810 MB disk space will be freed.

That was a lot of crap :-)

Since these days everything just works (I knew from a test with a live image) I could now cleanly install kubuntu-desktop and was happy again - yay.

0

From man apt-get:

autoremove is used to remove packages that were automatically installed to satisfy dependencies for some package and that are no more needed.

If you want to remove those unwanted apps you should use apt-get remove <appname> (or apt-get purge <appname> to remove also app's config files). Then you can run apt-get autoremove to get rid of their dependencies.

Be sure to check if apt-get isn't going to remove some really useful apps/dependencies before agreeing to proceed with uninstall process.

2
  • Thanks for the reply. I understand. I can do this for the applications I know about such as Pitivi. But I don't know if there are other packages which are redundant\ not in use. Are these removed automatically or left behind. If they are left behind, how do I find out about them? Oct 16, 2011 at 7:43
  • I don't know if there is any automatic way to search for unused apps. AFAIK there isn't, so the easiest way is to check in Ubuntu Software Center, in "Installed" section for apps you know you don't use. But remember: NEVER remove anything you're not sure about, better google for it first. There are many apps you may not (or even shouldn't) use, but are required for your system.
    – conv
    Oct 16, 2011 at 20:56
0

You may have to do this manually. The best way to do so is via the Ubuntu Software Center under the "Installed" tab and removing the apps you don't want. You can also try installing BleachBit, which is a GUI for removing unwanted files and repositories. It has the option to clean up APTs but I never tries it myself. Maybe that may help. Try it and let me know.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .