From 0820cb939dbf8cb453576e7498ec821716b939d9 Mon Sep 17 00:00:00 2001 From: Andrei Murariu Date: Tue, 3 Feb 2026 00:24:30 +0200 Subject: [PATCH] bug-fix: uninstall raycast leftovers --- lib/core/app_protection.sh | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/lib/core/app_protection.sh b/lib/core/app_protection.sh index a270626..bb93abe 100755 --- a/lib/core/app_protection.sh +++ b/lib/core/app_protection.sh @@ -1091,6 +1091,32 @@ find_app_files() { [[ "$bundle_id" =~ microsoft.*vscode ]] && [[ -d ~/.vscode ]] && files_to_clean+=("$HOME/.vscode") [[ "$app_name" =~ Docker ]] && [[ -d ~/.docker ]] && files_to_clean+=("$HOME/.docker") + # 7. Raycast + if [[ "$bundle_id" == "com.raycast.macos" ]]; then + local raycast_parents=( + "$HOME/Library/Application Support" + "$HOME/Library/Application Scripts" + "$HOME/Library/Containers" + ) + for parent in "${raycast_parents[@]}"; do + [[ -d "$parent" ]] || continue + while IFS= read -r -d '' p; do + files_to_clean+=("$p") + done < <(command find "$parent" -maxdepth 1 -type d -iname "*raycast*" -print0 2> /dev/null) + done + if [[ -d "$HOME/Library/Caches" ]]; then + while IFS= read -r -d '' p; do + files_to_clean+=("$p") + done < <(command find "$HOME/Library/Caches" -maxdepth 2 -type d -iname "*raycast*" -print0 2> /dev/null) + fi + local code_storage="$HOME/Library/Application Support/Code/User/globalStorage" + if [[ -d "$code_storage" ]]; then + while IFS= read -r -d '' p; do + files_to_clean+=("$p") + done < <(command find "$code_storage" -maxdepth 1 -type d -iname "*raycast*" -print0 2> /dev/null) + fi + fi + # Output results if [[ ${#files_to_clean[@]} -gt 0 ]]; then printf '%s\n' "${files_to_clean[@]}" @@ -1184,6 +1210,13 @@ find_app_system_files() { done < <(command find /private/var/db/receipts -maxdepth 1 \( -name "*$bundle_id*" \) -print0 2> /dev/null) fi + # Raycast system-level (*raycast* under /Library/Application Support) + if [[ "$bundle_id" == "com.raycast.macos" && -d "/Library/Application Support" ]]; then + while IFS= read -r -d '' p; do + system_files+=("$p") + done < <(command find "/Library/Application Support" -maxdepth 1 -type d -iname "*raycast*" -print0 2> /dev/null) + fi + local receipt_files="" receipt_files=$(find_app_receipt_files "$bundle_id")