Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clear out old distfiles #603

Open
dlangille opened this issue Nov 5, 2024 · 2 comments
Open

clear out old distfiles #603

dlangille opened this issue Nov 5, 2024 · 2 comments

Comments

@dlangille
Copy link
Contributor

dlangille commented Nov 5, 2024

From https://bsd.network/web/@dvl/113401885013085573

Courtesy of https://bsd.network/@piero

# cut -d \| -f 2 ${PORTSDIR}/INDEX* | while read d; do cd $d && make -V ALLFILES | tr " " "\n" | grep -v '^$' || : ; done > current-distfiles
# find ${DISTDIR} -type f | grep -v -f current-distfiles | xargs rm

Compile a list of the distfiles from INDEX, then delete everything not on that list.

The default command seems to use all the CPUs. Might want to try specifying -j - yeah, that works:

[0:38 mydev dvl /usr/ports] % time sudo make -j 36 index

Interesting, with 72 or 36, it's the same elapsed time: 13 minutes.

@smyru
Copy link

smyru commented Nov 5, 2024

There is no need to generate the INDEX locally, INDEX file are generated by the project and can be fetched from within the ports tree by command make fetchindex. See /usr/ports/Makefile for the target internals.

@dlangille
Copy link
Contributor Author

See draft blog post at https://news.freshports.org

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants