Page 1 of 1
apt-get autoremove command analog
Posted: 21. Dec 2017, 09:29
by reedych
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?
Re: apt-get autoremove command analog
Posted: 21. Dec 2017, 10:09
by DidierSpaier
Hello,
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.
This means that to implement this feature slapt-get should record that A was installed as a dependency of X, and more generally:
- 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
In my opinion, this is way too complicated and error prone, so if ever this feature was added to slapt-get, I would remove it from the slapt-get we ship in Slint
This being said, you are free to request that from slapt-get's author, Jason Woodward.
Greetings,
Didier
Re: apt-get autoremove command analog
Posted: 21. Dec 2017, 21:27
by gapan
DidierSpaier wrote:this is way too complicated and error prone
Exactly.
Re: apt-get autoremove command analog
Posted: 21. Dec 2017, 22:22
by ChuangTzu
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
Re: apt-get autoremove command analog
Posted: 22. Dec 2017, 12:53
by mimosa
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".