Thursday, May 2, 2024
 Popular · Latest · Hot · Upcoming
15
rated 0 times [  15] [ 0]  / answers: 1 / hits: 8248  / 1 Year ago, fri, february 24, 2023, 3:03:27

Is there any way do apt-get clean after apt-get install automatically, like in other distros?


More From » apt

 Answers
1

You just need to add it at the apt configurations files. Just run:



sudo sh -c "echo 'DSELECT::Clean "always";' >> /etc/apt/apt.conf.d/99AutomaticClean"


This will trigger automatic clean each time you do upgrade.



Lets explain this entry, from the man page:




Clean



Cache Clean mode; this value may be one of always, prompt, auto,
pre-auto and never. always and prompt will remove all packages
from the cache after upgrading, prompt (the default) does so
conditionally. auto removes only those packages which are no
longer downloadable (replaced with a new version for instance).
pre-auto performs this action before downloading new packages.




More info:



https://groups.google.com/d/msg/linux.debian.user/aK2jvfL_tuw/rUd6i6bd4YQJ


[#28010] Saturday, February 25, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
cisccla

Total Points: 66
Total Questions: 134
Total Answers: 115

Location: Croatia
Member since Fri, Sep 11, 2020
4 Years ago
;