4

I recently logged onto a shared server to see why I couldn't access a samba share. I tried to open smb.conf with vim and found out that vim wasn't installed anymore. I found out that my Samba share was inaccessible because samba was also no longer installed.

I looked in apt's logs and saw the timestamp by when Samba was removed and looked in auth.log and found this line right around that time:

COMMAND=/usr/bin/apt-get autoremove libpython3.8-stdlib

Every example I can find of apt/apt-get autoremove shows it invoked with no argument. What happens when you give it a package? Does this explicitly remove that package and all its cascading dependencies? This is the only explanation I can think of that would explain why samba and vim would be uninstalled.

1 Answer 1

8

You are (almost) correct in your assumption. Running apt-get autoremove <package> will first remove <package>, and then autoremove as if you had run apt-get autoremove with no parameters (i.e. removing all "automatically installed" packages that are not a dependency of any "manually installed" packages).

The important distinction here is that the autoremove part of running apt-get autoremove <package> will remove not only packages that are a dependency of <package>, but all packages that would otherwise be autoremoved.

You must log in to answer this question.

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