]> git.zerfleddert.de Git - m1-debian/blame_incremental - doc/wipe-linux.sh
Merge branch 'master' of 88.198.237.222:/git/m1-debian
[m1-debian] / doc / wipe-linux.sh
... / ...
CommitLineData
1#!/bin/sh
2
3# Source: https://mrcn.st/wipe-linux.sh - 2022-03-01
4
5diskutil list | grep Apple_APFS | grep '2\.5 GB' | sed 's/.* //g' | xargs -n 1 diskutil apfs deleteContainer
6diskutil list /dev/disk0 | grep -Ei 'asahi|linux|EFI' | sed 's/.* //g' | xargs -n 1 diskutil eraseVolume free free
7
8cat > /tmp/uuids.txt <<EOF
93D3287DE-280D-4619-AAAB-D97469CA9C71
10C8858560-55AC-400F-BBB9-C9220A8DAC0D
11EOF
12
13diskutil apfs listVolumeGroups >> /tmp/uuids.txt
14
15cd /System/Volumes/iSCPreboot
16
17for 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
24done
Impressum, Datenschutz