zfs/.github/workflows/scripts/reclaim_disk_space.sh

24 lines
424 B
Bash
Executable File

#!/bin/sh
set -eu
# remove 4GiB of images
sudo systemd-run docker system prune --force --all --volumes
# remove unused software
sudo systemd-run --wait rm -rf \
"$AGENT_TOOLSDIRECTORY" \
/opt/* \
/usr/local/* \
/usr/share/az* \
/usr/share/dotnet \
/usr/share/gradle* \
/usr/share/miniconda \
/usr/share/swift \
/var/lib/gems \
/var/lib/mysql \
/var/lib/snapd
# trim the cleaned space
sudo fstrim /