Apt-get has the command "autoremove" that removes not needed packages. An example:
1. Ivan installs package X, with dependencies: A, B.
2. Ivan installs package Y, with dependencies: B, C.
3. Ivan don't already need the package X, he do "slapt-get --remove X".
4. Ivan is angry. He doesn't have free space on hd. He do "slapt-get --autoremove"
5. slapt-get magically (or not magically) understands, there's no package that needs the package A.
6. slapt-get removes A.
What about realizing this?
apt-get autoremove command analog
-
- Posts: 518
- Joined: 20. Jun 2016, 20:15
Re: apt-get autoremove command analog
Hello,
from the Ubuntu man page:This means that to implement this feature slapt-get should record that A was installed as a dependency of X, and more generally:
This being said, you are free to request that from slapt-get's author, Jason Woodward.
Greetings,
Didier
from the Ubuntu man page:
Code: Select all
autoremove (and the auto-remove alias since 1.1)
autoremove is used to remove packages that were automatically
installed to satisfy dependencies for other packages and are now no
longer needed.
- if it was installed as a dependency of another package record the name of this dependent package,
- whenever a package is removed, update the record of all its dependencies accordingly, removing the removed package from the list of dependents of all its dependencies,
- when removepkg is used, scan each package to see if it has list of dependents that has been emptied
This being said, you are free to request that from slapt-get's author, Jason Woodward.
Greetings,
Didier
Re: apt-get autoremove command analog
Exactly.DidierSpaier wrote:this is way too complicated and error prone
Re: apt-get autoremove command analog
completely unnecessary and as Didier and gapan pointed out overly complicated....here are a few examples of problems people had with the so called "autoremove" feature:
https://www.linuxquestions.org/question ... fe-935534/
http://forums.debian.net/viewtopic.php?t=84644
https://www.linuxquestions.org/question ... fe-935534/
http://forums.debian.net/viewtopic.php?t=84644
Re: apt-get autoremove command analog
One might add, the whole idea dates back to the days of the 5GB hard drive. On a modern system, there is plenty of room for a little "clutter". The exceptions, if there are any, will generally be situations where the user "knows what he is doing".