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/ \