Is it safe to use the command apt-get autoremove in this particular scenario?

To focus on your past experience, if autoremove is going to remove "more than you intended", it's only doing that because those packages are no longer depended upon. That happens when you accidentally remove something :)

A common example from the good old days would be removing something Compiz-related. apt-get would show you a list of Compiz packages it was going to remove and you'd miss that ubuntu-desktop was also in there. ubuntu-desktop is just a meta-package that depends on all the packages that make up the desktop so removing it doesn't directly remove anything...

... But when you do an subsequent autoremove, all those things that ubuntu-desktop was the sole dependency... They're going bye-bye.

A few lessons:

  • sudo apt-get remove <package> will warn you what it's going to remove directly. It won't notify you about knock-on effects.
  • sudo apt-get autoremove should also warn you what it's going to do.
  • Use apt-get -s autoremove to do a simulated dry run if you're unsure. You can use that on all apt-get commands.
  • If you reboot and you're staring at TTY1 wondering what the monkeys you've nuked this time, /var/log/apt/history.log should have you most recent activity.
  • If in doubt, check ubuntu-desktop is installed.

Is autoremove safe? It's heavy machinery so it's only as safe as the driver... But that said, it's hard to do permanent damage.


The following packages were automatically installed and are no longer required

If they are no longer required apt will know when it builds the dependencies. apt-get just inform you "Hey, you removed something that installed these packages. I prefer that you decide what to do with them since you are the boss".

Now, it is safe? Yes. What happen if you need em again? apt will download them. Should I check the list? Yes. A light check might be needed.