apt-get autoremove command analog

You have a problem with Salix? Post here and we'll do what we can to help.
Post Reply
reedych
Posts: 37
Joined: 11. Mar 2017, 05:24

apt-get autoremove command analog

Post 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?
DidierSpaier
Posts: 518
Joined: 20. Jun 2016, 20:15

Re: apt-get autoremove command analog

Post 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
User avatar
gapan
Salix Wizard
Posts: 6241
Joined: 6. Jun 2009, 17:40

Re: apt-get autoremove command analog

Post by gapan »

DidierSpaier wrote:this is way too complicated and error prone
Exactly.
Image
Image
User avatar
ChuangTzu
Donor
Posts: 388
Joined: 19. May 2015, 23:34

Re: apt-get autoremove command analog

Post 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
Image
Image
User avatar
mimosa
Salix Warrior
Posts: 3311
Joined: 25. May 2010, 17:02
Contact:

Re: apt-get autoremove command analog

Post 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".
Post Reply