From 6320b9e68e03cdf390b444693e06aaa51a49f0ca Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 11 Jan 2023 15:18:51 -0800 Subject: [PATCH] CI: remove unused packages/snaps 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 Reviewed-by: Richard Yao Signed-off-by: Brian Behlendorf Closes #14374 --- .github/workflows/scripts/reclaim_disk_space.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/scripts/reclaim_disk_space.sh b/.github/workflows/scripts/reclaim_disk_space.sh index cc16a9079317..a0d1e9c8f016 100755 --- a/.github/workflows/scripts/reclaim_disk_space.sh +++ b/.github/workflows/scripts/reclaim_disk_space.sh @@ -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