From 083863d958cc3a8597e6d4bc3809483fc4384ecb Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Tue, 17 Sep 2024 11:52:08 -0500 Subject: [PATCH] try new remove strategy --- .github/actions/clean-disk/action.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/actions/clean-disk/action.yml b/.github/actions/clean-disk/action.yml index fa5c51b..6d46407 100644 --- a/.github/actions/clean-disk/action.yml +++ b/.github/actions/clean-disk/action.yml @@ -34,11 +34,14 @@ runs: echo "Removing unwanted software... " - # if [[ "${{ inputs.purge-packages }}" == 'true' ]]; then - # sudo apt-get purge \ - # --allow-remove-essential \ - # $(non_manifest_packages) # > /dev/null - # fi + if [[ "${{ inputs.purge-packages }}" == 'true' ]]; then + # sudo apt-get purge \ + # --allow-remove-essential \ + # $(non_manifest_packages) # > /dev/null + # Remove all packages that are not required by the base system: + sudo apt-get remove $(comm -23 <(apt-mark showmanual | sort -u) <(gzip -dc /var/log/installer/initial-status.gz | sed -n 's/^Package: //p' | sort -u)) + fi + sudo rm -rf \ /var/lib/docker/ \