View previous topic :: View next topic |
Author |
Message |
Ralphred l33t

Joined: 31 Dec 2013 Posts: 757
|
Posted: Thu Feb 08, 2024 10:21 am Post subject: I'm feeling lazy... |
|
|
My /var/cache/distfiles just hit 100G; has anyone written a script to delete "old sources" once a newer version is downloaded?
Obviously I could just rm -rf it and deal with the problem in 4 years time, but I thought I'd ask first... |
|
Back to top |
|
 |
eeckwrk99 Apprentice


Joined: 14 Mar 2021 Posts: 253 Location: Gentoo forums
|
Posted: Thu Feb 08, 2024 10:42 am Post subject: Re: I'm feeling lazy... |
|
|
app-portage/gentoolkit provides eclean-dist command, which can precisely do this.
The --deep option allows to only keep files corresponding to currently installed packages.
I do it manually once in a while but you could automate it with a systemd service/timer / crontab, a simple bash script or even a Portage post-sync hook. |
|
Back to top |
|
 |
Ralphred l33t

Joined: 31 Dec 2013 Posts: 757
|
Posted: Thu Feb 08, 2024 11:29 am Post subject: |
|
|
Thanks!
Now I'm glad I was feeling lazy, and didn't re-invent the wheel  |
|
Back to top |
|
 |
|