It’s time to clear old distfiles. Based on Moving distfiles to a new filesystem & deleting unused distfiles, I did the following on the aws-1-ingress01 jail.
In short:
- fetch index
- list DISTFILES used by index
- remove DISTFILES not used by index
The commands:
root@freshports:/usr/ports # make fetchindex /usr/bin/env fetch -am -o /usr/ports/INDEX-14.xz https://download.FreeBSD.org/ports/index/INDEX-14.xz /usr/ports/INDEX-14.xz 1864 kB 18 MBps 00s root@freshports:/usr/ports # ls -l root@freshports:/usr/ports # ls -lh INDE* -rw-r--r-- 1 root wheel 46M Mar 24 10:30 INDEX-14 root@freshports:/usr/ports # du -ch -d 0 /usr/ports/distfiles/ 87G /usr/ports/distfiles/ 87G total root@freshports:/ # sh list-current-distfiles.sh > /tmp/distfiles-to-keep ld-elf.so.1: /lib/libcxxrt.so.1: version CXXABI_1.3.11 required by /lib/libc++.so.1 not found make: "/usr/ports/Mk/Uses/compiler.mk" line 105: warning: "/usr/bin/clang --version" returned non-zero status make: "/usr/ports/Mk/Uses/compiler.mk" line 134: warning: "c++ -### /dev/null 2>&1" returned non-zero status ... so much output ... make: "/usr/ports/Mk/Uses/compiler.mk" line 105: warning: "/usr/bin/clang --version" returned non-zero status make: "/usr/ports/Mk/Uses/compiler.mk" line 134: warning: "c++ -### /dev/null 2>&1" returned non-zero status root@freshports:/ # wc -l /tmp/distfiles-to-keep 191983 /tmp/distfiles-to-keep root@freshports:/ # find /usr/ports/distfiles -type f | grep -v -f /tmp/current-distfiles | xargs rm root@freshports:/ # du -ch -d 0 /usr/ports/distfiles/ 42G /usr/ports/distfiles/ 42G total root@freshports:/ #
Done. Perhaps next time, I’ll code this into a monthly periodic script.