From: Thomas Glanzmann Date: Tue, 1 Mar 2022 12:22:42 +0000 (+0100) Subject: new wipe script X-Git-Url: http://cvs.zerfleddert.de/cgi-bin/gitweb.cgi/m1-debian/commitdiff_plain/2ad631dc766efdf45e699dc24ae4d036911e9211 new wipe script --- diff --git a/doc/marcan_sep_cleanup_script.txt b/doc/marcan_sep_cleanup_script.txt deleted file mode 100644 index bfb3874..0000000 --- a/doc/marcan_sep_cleanup_script.txt +++ /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 <> /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 index 0000000..69ca850 --- /dev/null +++ b/doc/wipe-linux.sh @@ -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 <> /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