Skip to content

Commit

Permalink
Sync cleanup with Open Brush (most importantly, add support for ubunt…
Browse files Browse the repository at this point in the history
…u-24.04)
  • Loading branch information
mikeage committed Dec 17, 2024
1 parent 6bec5a2 commit 68bd580
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,22 +196,22 @@ jobs:
echo "Initial free space"
df -h /
echo "Removing all pre-loaded docker images"
docker rmi $(docker image ls -aq) # Removes ~6GB
docker image ls -aq | xargs -r docker rmi # Removes ~3GB
df -h /
echo "Listing 100 largest packages"
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -rn | head -n 100
echo "Removing unneeded large packages"
sudo apt update
sudo apt remove -y '^ghc-.*' '^dotnet-.*' azure-cli powershell google-chrome-stable firefox microsoft-edge-stable 'mongodb-*' 'mysql-*' 'mariadb-*' 'temurin-*' 'openjdk-*' default-jre-headless # Removes ~7GB # Adding 'google-cloud-*' removes another 750MB but takes about a minute; not worth it
sudo apt remove -y '^ghc-.*' '^dotnet-.*' azure-cli powershell google-chrome-stable firefox microsoft-edge-stable 'mongodb-*' 'mysql-*' 'mariadb-*' 'temurin-*' 'openjdk-*' default-jre-headless mono-devel libgl1-mesa-dri # Removes ~6GB
sudo apt autoremove -y
sudo apt clean
df -h /
echo "Listing 100 largest remaining packages"
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -rn | head -n 100
echo "Removing remaining large directories"
echo "Removing Android"
sudo rm -rf /usr/local/lib/android # Removes ~9GB
df -h /
echo "Removing remaining large directories"
rm -rf /usr/share/dotnet/ # Removes ~1GB
rm -rf "$AGENT_TOOLSDIRECTORY" # Removes ~6GB
rm -rf "$AGENT_TOOLSDIRECTORY" # Removes ~7GB
echo "Disk space after cleanup"
df -h /
Expand Down

0 comments on commit 68bd580

Please sign in to comment.