Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 893c928

Browse files
committed
sudo
1 parent ae8f740 commit 893c928

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/ci/scripts/free-disk-space.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ cleanDocker() {
131131
}
132132

133133
removeAllSnaps() {
134+
# This won't remove the snaps `core` and `snapd`
134135
sudo snap remove $(snap list | awk '!/^Name|^core|^snapd/ {print $1}')
135136
}
136137

@@ -141,9 +142,6 @@ AVAILABLE_INITIAL=$(getAvailableSpace)
141142
printDF "BEFORE CLEAN-UP:"
142143
echo ""
143144

144-
echo "=> installed snaps:"
145-
snap list
146-
147145
removeDir /usr/local/lib/android
148146
removeDir /usr/share/dotnet
149147
removeDir /usr/share/swift
@@ -162,7 +160,7 @@ execAndMeasureSpaceChange cleanDocker "Docker images"
162160
execAndMeasureSpaceChange cleanSwap "Swap storage"
163161

164162
echo "=> largest directories:"
165-
du --max-depth=7 /* -h | sort -nr | head -1000
163+
sudo du --max-depth=7 /* -h | sort -nr | head -1000
166164

167165
# Output saved space statistic
168166
echo ""

0 commit comments

Comments
 (0)