Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
I'm feeling lazy...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
Ralphred
Guru
Guru


Joined: 31 Dec 2013
Posts: 501

PostPosted: Thu Feb 08, 2024 10:21 am    Post subject: I'm feeling lazy... Reply with quote

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
View user's profile Send private message
eeckwrk99
Apprentice
Apprentice


Joined: 14 Mar 2021
Posts: 163
Location: Gentoo forums

PostPosted: Thu Feb 08, 2024 10:42 am    Post subject: Re: I'm feeling lazy... Reply with quote

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
View user's profile Send private message
Ralphred
Guru
Guru


Joined: 31 Dec 2013
Posts: 501

PostPosted: Thu Feb 08, 2024 11:29 am    Post subject: Reply with quote

Thanks!
Now I'm glad I was feeling lazy, and didn't re-invent the wheel :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum