]> cvs.zerfleddert.de Git - m1-debian/commitdiff
new wipe script
authorThomas Glanzmann <thomas@glanzmann.de>
Tue, 1 Mar 2022 12:22:42 +0000 (13:22 +0100)
committerThomas Glanzmann <thomas@glanzmann.de>
Tue, 1 Mar 2022 12:22:42 +0000 (13:22 +0100)
doc/marcan_sep_cleanup_script.txt [deleted file]
doc/wipe-linux.sh [new file with mode: 0644]

diff --git a/doc/marcan_sep_cleanup_script.txt b/doc/marcan_sep_cleanup_script.txt
deleted file mode 100644 (file)
index bfb3874..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/bin/sh
-
-# Fetch from https://marcan.st/paste/4wuJXyRX.txt
-# Written by marcan 2022-02-22
-
-cat > /tmp/uuids.txt <<EOF
-3D3287DE-280D-4619-AAAB-D97469CA9C71
-C8858560-55AC-400F-BBB9-C9220A8DAC0D
-EOF
-
-diskutil apfs listVolumeGroups >> /tmp/uuids.txt
-
-cd /System/Volumes/iSCPreboot
-
-for i in ????????-????-????-????-????????????; do
-    if grep -q "$i" /tmp/uuids.txt; then
-        echo "KEEP $i"
-    else
-        echo "RM $i"
-        rm -rf "$i"
-    fi
-done
diff --git a/doc/wipe-linux.sh b/doc/wipe-linux.sh
new file mode 100644 (file)
index 0000000..69ca850
--- /dev/null
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# Source: https://mrcn.st/wipe-linux.sh - 2022-03-01
+
+diskutil list | grep Apple_APFS | grep '2\.5 GB' | sed 's/.* //g' | xargs -n 1 diskutil apfs deleteContainer
+diskutil list /dev/disk0 | grep -Ei 'asahi|linux|EFI' | sed 's/.* //g' | xargs -n 1 diskutil eraseVolume free free
+
+cat > /tmp/uuids.txt <<EOF
+3D3287DE-280D-4619-AAAB-D97469CA9C71
+C8858560-55AC-400F-BBB9-C9220A8DAC0D
+EOF
+
+diskutil apfs listVolumeGroups >> /tmp/uuids.txt
+
+cd /System/Volumes/iSCPreboot
+
+for i in ????????-????-????-????-????????????; do
+    if grep -q "$i" /tmp/uuids.txt; then
+        echo "KEEP $i"
+    else
+        echo "RM $i"
+        rm -rf "$i"
+    fi
+done
Impressum, Datenschutz