Originally Posted by T3RM1NVT0R
1. How apt-get autoremove calculates which packages to be removed.
2. If this option is so disastrous then why it is there.
3. When I did small testing with my Debian system it did not remove any package which was in use when I ran apt-get autoremove.
1. It simply seeks in its database for packages that are marked as automatically installed but are not dependencies for another package.
2. auto-remove is not dangerous in every case. It can
become dangerous when it is used together with meta-packages. It is totally possible to install a Debian system without using any meta-package. It also is totally possible to build your own distro using the APT package management system without any meta-packages. It is just that it is convenient to use meta-packages. The same way you could ask why rm
has the -rf option, although doing rm -rf /usr
(WARNING, don't do that if you don't want to destroy your system) will in any case render your system unusable.
Since you are only be able to use apt-get auto-remove
(or the rm
thing) as root, it is up to your responsibility to actually think about what you are doing and read the output on the screen before confirming it.
3. Can not say much about that, I have seen many threads in different forums where auto-remove showed the behavior edbarx described, and back in the days I used Debian I also sometimes had problems with that, especially when using Sid (or Sid/Experimental mixes). If you use package management systems with automatic dependency resolution you should be prepared that sometimes odd things may happen. Again, this is why you always should read what is displayed on the screen before confirming anything (not saying that you don't do that).