]> git.zerfleddert.de Git - m1-debian/blob - doc/wipe-linux.sh
add apt-update; don't try to install unstable packages
[m1-debian] / doc / wipe-linux.sh
1 #!/bin/sh
2
3 # Source: https://mrcn.st/wipe-linux.sh - 2022-03-01
4
5 diskutil list | grep Apple_APFS | grep '2\.5 GB' | sed 's/.* //g' | xargs -n 1 diskutil apfs deleteContainer
6 diskutil list /dev/disk0 | grep -Ei 'asahi|linux|EFI' | sed 's/.* //g' | xargs -n 1 diskutil eraseVolume free free
7
8 cat > /tmp/uuids.txt <<EOF
9 3D3287DE-280D-4619-AAAB-D97469CA9C71
10 C8858560-55AC-400F-BBB9-C9220A8DAC0D
11 EOF
12
13 diskutil apfs listVolumeGroups >> /tmp/uuids.txt
14
15 cd /System/Volumes/iSCPreboot
16
17 for i in ????????-????-????-????-????????????; do
18 if grep -q "$i" /tmp/uuids.txt; then
19 echo "KEEP $i"
20 else
21 echo "RM $i"
22 rm -rf "$i"
23 fi
24 done
Impressum, Datenschutz