Skip to content

Commit

Permalink
CI: remove unused packages/snaps
Browse files Browse the repository at this point in the history
Removing portions of packages/snaps directly with rm can result in
unexpected errors when running `apt update`.  Free up the additional
space by removing (some) packages with the proper tools.

This change frees up slightly less space than before, but it is
expected to still be sufficient.

Reviewed-by: George Melikov <[email protected]>
Reviewed-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes openzfs#14374
  • Loading branch information
behlendorf authored Jan 11, 2023
1 parent 6f2ffd2 commit 6320b9e
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/scripts/reclaim_disk_space.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
#!/bin/sh
#!/bin/sh -x

set -eu

# remove 4GiB of images
sudo systemd-run docker system prune --force --all --volumes

# remove unused packages
sudo apt remove -q --purge firefox

# remove unused software
sudo systemd-run 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
/usr/share/swift

0 comments on commit 6320b9e

Please sign in to comment.