2

I was going to use the apt-get autoremove command on my fresh install of Ubuntu-Mate. There are 97 packages to be removed. I don't know what any of them are really, except for a few font files maybe.

Should run this command and should I be regularly running 'apt-get autoremove' on my home server running Ubuntu 18.04.3 LTS?

Thanks.

2
  • 1
    Please update your question with the full output of sudo apt-get autoremove ..
    – Soren A
    Dec 3, 2019 at 13:45
  • I do run it regularly. Please, test it with apt -s autoremove and paste its output.
    – FedKad
    Dec 3, 2019 at 14:09

2 Answers 2

1

I use sudo apt autoremove very regularly. This command removes all packages that are marked as "automatically installed" and that are no dependency of any other package on the system. It also automatically removes older kernels, except the last but one, so that you always can revert to the previous kernel if needed.

For your freshly installed Mate, it will be perfectly safe to run the autoremove command.

There is a potential risk when you removed metapackages. A metapackage is a small package that contains no software on its own, but that contains a lot of dependencies that are pulled in upon installing the meta-package. Typical examples are the desktop packages such as ubuntu-desktop, xubuntu-desktop, etc. There, indeed, you are relying on whether dependencies have been properly marked as "manually installed".

In practice, in my test, removing ubuntu-desktop followed by sudo apt autoremove would not remove any packages. That means that the "top level" packages that depend on ubuntu-desktop were "automatically" marked as "manually installed". It is different if you install a second desktop: in my test, autoremove after removing xubuntu-desktop, which I also have installed, would remove the whole xfce desktop, meaning indeed that in this case, all packages that were pulled in by the xubuntu-desktop metapackage, are marked (rightfully in this case) as "automatically installed".

Bottom line is that some caution is always warranted. Always check what will be removed. However, in no circumstances will you break your system. You can always reinstall what was removed. In case of the desktop metapackages, you can always reinstall. They remain your safety net to restore all essential components of a desktop environment.

0

Should run this command

If you want to nobody is going to stop you :)

and should I be regularly running apt-get autoremove

In all the years I use Ubuntu (and that is from 5.04) I never ever used it. In my opinion you do not need to. Then again I re-install every 6 months and am not an LTS user. You are so, if you do feel like running it, you might want to run it after a point release arrived or when you yourself removed a lot of software. That seems like good moments if you do want to run it.

Just a comment to keep you on your tows: if your system does what you ask of it why do you feel the need to remove packages? They take up little space and do no harm.

You did not include the list of packages so we can not comment on those. I would add it to the question for a more specific answer regarding your situation if I was you.

3
  • Are you sure you never used apt autoremove? Please, test it: apt -s autoremove at least once!
    – FedKad
    Dec 3, 2019 at 14:08
  • Yes I am sure. Again: my installation does not survive longer than 6 months and I hardly ever delete software.
    – Rinzwind
    Dec 3, 2019 at 14:27
  • I am relatively new Ubuntu user (9 months old) and I use it solely. (I am now a full-time Ubuntu user, no Windows or anything else. I have abandoned Windows after 25 years of using it.) I will also never be an LTS user. Initially, when I bought my new computer, I installed 18.10, then upgraded to 19.04, and then to 19.10. Do you mean that you do not do (in-place) upgrade, but you do a new installation every six months?
    – FedKad
    Dec 3, 2019 at 14:42

You must log in to answer this question.

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