From 8a58b8153c4ef9aef2e2a37699da7cfb11768d0a Mon Sep 17 00:00:00 2001 From: Mridul Agarwal Date: Sat, 7 Feb 2026 13:37:58 +0200 Subject: [PATCH] delete snapshot if update fails since it takes up space, esspecially when redoing the update as it makes another snapshot (#4531) Co-authored-by: Mrid22 --- bin/omarchy-snapshot | 2 ++ bin/omarchy-update | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/omarchy-snapshot b/bin/omarchy-snapshot index ee79512a..d9f4c2d3 100755 --- a/bin/omarchy-snapshot +++ b/bin/omarchy-snapshot @@ -31,4 +31,6 @@ create) restore) sudo limine-snapper-restore ;; +delete) + sudo snapper -c "$config" delete 0 esac diff --git a/bin/omarchy-update b/bin/omarchy-update index 7b800005..a250166c 100755 --- a/bin/omarchy-update +++ b/bin/omarchy-update @@ -2,7 +2,7 @@ set -e -trap 'echo ""; echo -e "\033[0;31mSomething went wrong during the update!\n\nPlease review the output above carefully, correct the error, and retry the update.\n\nIf you need assistance, get help from the community at https://omarchy.org/discord\033[0m"' ERR +trap 'echo ""; echo -e "\033[0;31mSomething went wrong during the update!\n\nPlease review the output above carefully, correct the error, and retry the update.\n\nIf you need assistance, get help from the community at https://omarchy.org/discord\033[0m";omarchy-snapshot delete' ERR if [[ $1 == "-y" ]] || omarchy-update-confirm; then omarchy-snapshot create || [ $? -eq 127 ]