Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

Leave security and management agents to their makers' uninstallers

Țugui Dragoș0e82c3fbce4b
diff --git a/Localization/Peel/Localizable.xcstrings b/Localization/Peel/Localizable.xcstrings
index 5f69ebba..eb8e9df9 100644
--- a/Localization/Peel/Localizable.xcstrings
+++ b/Localization/Peel/Localizable.xcstrings
@@ -870,6 +870,112 @@
}
}
},
+ "%@ documents removing %@ with its own uninstaller, which also takes what it keeps in the system and the settings that manage it. Moved from here, those would stay behind, so Peel leaves it and its files where they are." : {
+ "localizations" : {
+ "cs" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Výrobce %@ uvádí ve své dokumentaci, že se aplikace %@ odstraňuje vlastním odinstalátorem, který odstraní i to, co aplikace uchovává v systému, a nastavení, která ji spravují. Kdyby byla aplikace odtud přesunuta do koše, zanechala by je po sobě, a proto Peel aplikaci i její soubory ponechává na místě."
+ }
+ },
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ beschreibt, wie „%@“ mit einem eigenen Deinstallationsprogramm entfernt wird, das auch erfasst, was die App im System ablegt, und die Einstellungen, mit denen sie verwaltet wird. Würde die App von hier aus verschoben, blieben beide zurück, daher lässt Peel die App und ihre Dateien dort, wo sie sind."
+ }
+ },
+ "es" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ indica en su documentación que %@ se elimina con su propio desinstalador, que también se lleva lo que la app guarda en el sistema y los ajustes con los que se gestiona. Si se trasladara desde aquí, todo eso se quedaría atrás, así que Peel deja la app y sus archivos donde están."
+ }
+ },
+ "fr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Selon la documentation de %@, %@ se désinstalle avec son propre programme, qui supprime aussi ce que l’app conserve dans le système et les réglages qui la gèrent. Placée dans la corbeille depuis cette page, l’app les laisserait derrière elle : Peel la laisse donc là où elle est, avec ses fichiers."
+ }
+ },
+ "it" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ indica di rimuovere %@ con il proprio programma di disinstallazione, che toglie anche ciò che l’app tiene nel sistema e le impostazioni che la gestiscono. Spostandola da qui, tutto questo resterebbe sul Mac, quindi Peel lascia l’app e i suoi file dove sono."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@は、“%@”を専用のアンインストーラで取り除くよう案内しています。このアンインストーラは、アプリがシステム内に置いているものや、アプリを管理する設定も一緒に取り除きます。ここからゴミ箱に入れた場合はそれらが残ってしまうため、Peelはこのアプリとそのファイルをそのままにします。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@은(는) 공식 문서에서 ‘%@’을(를) 자체 제거 프로그램으로 제거하도록 안내합니다. 이 제거 프로그램은 앱이 시스템에 보관하는 항목과 앱을 관리하는 설정도 함께 제거합니다. 여기에서 휴지통으로 이동하면 이러한 항목이 남게 되므로, Peel은 앱과 앱의 파일을 그대로 둡니다."
+ }
+ },
+ "nl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ beschrijft hoe je %@ verwijdert met het eigen de-installatieprogramma. Dat verwijdert ook wat de app in het systeem bewaart en de instellingen waarmee de app wordt beheerd. Als de app hier naar de prullenmand werd verplaatst, zouden die achterblijven, dus laat Peel de app en de bestanden ervan staan."
+ }
+ },
+ "pl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Według dokumentacji producenta %@ aplikację %@ odinstalowuje się jej własnym dezinstalatorem, który usuwa też to, co aplikacja przechowuje w systemie, oraz ustawienia, które nią zarządzają. Przeniesiona stąd do Kosza, pozostawiłaby po sobie jedno i drugie, dlatego Peel zostawia ją i jej pliki na miejscu."
+ }
+ },
+ "pt" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Segundo a documentação de %@, %@ deve ser removido com o próprio desinstalador, que também leva o que ele mantém no sistema e os ajustes que o gerenciam. Se o app fosse movido daqui, isso ficaria para trás, então o Peel deixa o app e os arquivos dele onde estão."
+ }
+ },
+ "ro" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ documentează eliminarea aplicației %@ cu propriul program de dezinstalare, care elimină atât ce păstrează aplicația în sistem, cât și configurările care o gestionează. Dacă ar fi mutată în Coș de aici, acestea ar rămâne în urmă, așa că Peel lasă aplicația și fișierele ei acolo unde sunt."
+ }
+ },
+ "ru" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "В документации %@ сказано, что приложение «%@» удаляется его собственной программой удаления, которая также убирает то, что оно хранит в системе, и управляющие им настройки. Если бы его переместили отсюда, все это осталось бы после него, поэтому Peel оставляет на месте и приложение, и его файлы."
+ }
+ },
+ "sv" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ beskriver hur %@ tas bort med en egen avinstallerare, som även tar bort det appen har i systemet och inställningarna som hanterar den. Om appen flyttades härifrån skulle de lämnas kvar, så Peel låter appen och dess filer vara där de är."
+ }
+ },
+ "tr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ belgelerine göre, %@ uygulaması kendi yükleme kaldırıcısıyla kaldırılır; bu kaldırıcı, uygulamanın sistemde tuttuklarını ve onu yöneten ayarları da kaldırır. Uygulama buradan Çöp Sepeti’ne taşınsaydı bunlar geride kalırdı, bu yüzden Peel uygulamaya ve dosyalarına dokunmaz."
+ }
+ },
+ "uk" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ у своїй документації описує вилучення програми «%@» власним деінсталятором, який вилучає також те, що програма зберігає в системі, і налаштування, які нею керують. Якби програму перемістили звідси, вона залишила б їх по собі, тому Peel лишає її та її файли на місці."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@在文档中说明,“%@”应使用其自己的卸载器移除,该卸载器还会一并移除它保存在系统中的内容以及管理它的设置。如果从此处移走,这些内容会被留下,因此Peel会将它及其文件留在原处。"
+ }
+ },
+ "zh-Hant" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@在說明文件中指出,移除「%@」應使用其自己的解除安裝程式,該程式也會一併移除此App保存在系統中的項目,以及管理它的設定。若從這裡移動此App,這些項目就會留下,因此Peel會將它及其檔案原地保留。"
+ }
+ }
+ }
+ },
"%@ doesn’t say where it updates from in a way Peel can read. Peel reads an app’s update feed from the app’s own files, and asking Apple about every app instead would send Apple a list of what is installed on this Mac. Look for an update inside the app." : {
"localizations" : {
"cs" : {
@@ -6767,6 +6873,112 @@
}
}
},
+ "%@’s Instructions" : {
+ "localizations" : {
+ "cs" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Pokyny výrobce %@"
+ }
+ },
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Anleitung von %@"
+ }
+ },
+ "es" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Instrucciones de %@"
+ }
+ },
+ "fr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Instructions de %@"
+ }
+ },
+ "it" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Istruzioni di %@"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@のアンインストール手順"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@의 제거 안내"
+ }
+ },
+ "nl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Instructies van %@"
+ }
+ },
+ "pl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Instrukcje producenta %@"
+ }
+ },
+ "pt" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Instruções de %@"
+ }
+ },
+ "ro" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Instrucțiuni de la %@"
+ }
+ },
+ "ru" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Инструкция от %@"
+ }
+ },
+ "sv" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Instruktioner från %@"
+ }
+ },
+ "tr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ Yönergeleri"
+ }
+ },
+ "uk" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Інструкції %@"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@的说明"
+ }
+ },
+ "zh-Hant" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@的說明"
+ }
+ }
+ }
+ },
"%@’s privacy permissions were reset before the move." : {
"localizations" : {
"cs" : {
@@ -65816,6 +66028,112 @@
}
}
},
+ "Left alone: %@’s own uninstaller removes it." : {
+ "localizations" : {
+ "cs" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Nedotčeno: tuto položku odstraní vlastní odinstalátor výrobce %@."
+ }
+ },
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Unangetastet: Das eigene Deinstallationsprogramm von %@ entfernt dies."
+ }
+ },
+ "es" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "No se toca: se elimina con el desinstalador de %@."
+ }
+ },
+ "fr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Laissé en place : le programme de désinstallation de %@ le supprime."
+ }
+ },
+ "it" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Resta dov’è: si rimuove con il programma di disinstallazione di %@."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "対象外: %@独自のアンインストーラによって取り除かれます。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "그대로 둠: %@의 자체 제거 프로그램이 이 항목을 제거합니다."
+ }
+ },
+ "nl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Blijft staan: het eigen de-installatieprogramma van %@ verwijdert dit."
+ }
+ },
+ "pl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Nietknięte: usuwa to własny dezinstalator producenta %@."
+ }
+ },
+ "pt" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Preservado: o desinstalador próprio de %@ remove isto."
+ }
+ },
+ "ro" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Lăsat neatins: se elimină cu programul de dezinstalare de la %@."
+ }
+ },
+ "ru" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Остается на месте: удаляется программой удаления от %@."
+ }
+ },
+ "sv" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Rörs inte: avinstalleraren från %@ tar bort det här."
+ }
+ },
+ "tr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Yerinde kalır: %@ kendi yükleme kaldırıcısıyla kaldırır."
+ }
+ },
+ "uk" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Лишається на місці: це вилучає власний деінсталятор %@."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "留在原处:%@自己的卸载器会将其移除。"
+ }
+ },
+ "zh-Hant" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "原地保留:%@自己的解除安裝程式會移除它。"
+ }
+ }
+ }
+ },
"Left alone: Peel removes itself only from Settings." : {
"localizations" : {
"cs" : {
@@ -120933,6 +121251,112 @@
}
}
},
+ "Removed with %@’s own uninstaller" : {
+ "localizations" : {
+ "cs" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Odstraňuje se vlastním odinstalátorem výrobce %@"
+ }
+ },
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Wird mit dem eigenen Deinstallationsprogramm von %@ entfernt"
+ }
+ },
+ "es" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Se elimina con el desinstalador de %@"
+ }
+ },
+ "fr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "À supprimer avec le programme de désinstallation de %@"
+ }
+ },
+ "it" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Si rimuove con il programma di disinstallazione di %@"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "アンインストールは%@独自のアンインストーラで行います"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@의 자체 제거 프로그램으로 제거함"
+ }
+ },
+ "nl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Verwijderen met het de-installatieprogramma van %@"
+ }
+ },
+ "pl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Odinstalowanie własnym dezinstalatorem producenta %@"
+ }
+ },
+ "pt" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Removido com o desinstalador próprio de %@"
+ }
+ },
+ "ro" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Se elimină cu programul de dezinstalare de la %@"
+ }
+ },
+ "ru" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Удаляется программой удаления от %@"
+ }
+ },
+ "sv" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Tas bort med avinstalleraren från %@"
+ }
+ },
+ "tr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "%@ kendi yükleme kaldırıcısıyla kaldırır"
+ }
+ },
+ "uk" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Вилучається власним деінсталятором %@"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "使用%@自己的卸载器移除"
+ }
+ },
+ "zh-Hant" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "使用%@自己的解除安裝程式移除"
+ }
+ }
+ }
+ },
"Removes every download Homebrew keeps, even for the latest versions, as well as what Clean Up removes. The downloads of what is installed now stay." : {
"localizations" : {
"cs" : {
diff --git a/Packages/PeelCore/Sources/PeelCommandLine/Commands/AppCommands.swift b/Packages/PeelCore/Sources/PeelCommandLine/Commands/AppCommands.swift
index 016e59de..4bebf23f 100644
--- a/Packages/PeelCore/Sources/PeelCommandLine/Commands/AppCommands.swift
+++ b/Packages/PeelCore/Sources/PeelCommandLine/Commands/AppCommands.swift
@@ -436,12 +436,22 @@ struct UninstallCommand: AsyncParsableCommand {
return CommandFailure("macOS lets your terminal app move \(name) only with App Management. Allow it in System Settings > Privacy & Security > App Management, then try again, or remove it with the Peel app.")
}
- /// Throws for Peel itself. Peel removes itself from its own Settings, after unregistering its login item
- /// and privileged helper. If `peel` moved the app, the helper would stay registered with launchd and
- /// point into the Trash.
- static func refuseIfItIsPeel(_ target: InstalledApp) throws {
- guard target.isPeelItself else { return }
- throw CommandFailure("Peel removes itself from its own settings, which unregisters the helper first. Open Peel and click Remove Peel in Settings.")
+ /// Throws for an app removed elsewhere. Peel removes itself from its own Settings, after unregistering its login
+ /// item and privileged helper: if `peel` moved the app, the helper would stay registered with launchd and point
+ /// into the Trash. An agent goes by its maker's uninstaller, which also takes what it keeps in the system.
+ static func refuseIfRemovedElsewhere(_ target: InstalledApp) throws {
+ switch target.removedElsewhere {
+ case nil:
+ return
+ case .byRemovePeel:
+ throw CommandFailure("Peel removes itself from its own settings, which unregisters the helper first. Open Peel and click Remove Peel in Settings.")
+ case .byItsMaker(let uninstaller):
+ let step = switch uninstaller.step {
+ case .command(let command): "run `\(command)`"
+ case .uninstaller(let url): "open \(url.path(percentEncoded: false))"
+ }
+ throw CommandFailure("\(Output.plain(target.name)) is removed with \(uninstaller.maker)'s own uninstaller, which also takes what it keeps in the system: \(step). See \(uninstaller.instructions.absoluteString)")
+ }
}
/// Throws for an app inside another package, such as a helper app inside the app it serves: moved alone, it
@@ -476,7 +486,7 @@ struct UninstallCommand: AsyncParsableCommand {
func run() async throws {
let apps = await AppCatalog.installedApps()
let target = try AppLookup.app(matching: app, in: apps)
- try Self.refuseIfItIsPeel(target)
+ try Self.refuseIfRemovedElsewhere(target)
guard !target.isSystemProtected else {
throw CommandFailure("macOS protects \(Output.plain(target.name)), so it can't be removed.")
}
diff --git a/Packages/PeelCore/Sources/PeelCore/Apps/InstalledApp.swift b/Packages/PeelCore/Sources/PeelCore/Apps/InstalledApp.swift
index 7434515c..24e52954 100644
--- a/Packages/PeelCore/Sources/PeelCore/Apps/InstalledApp.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Apps/InstalledApp.swift
@@ -155,6 +155,12 @@ public struct InstalledApp: Sendable, Hashable, Identifiable {
return names
}
+ /// How this app is removed when Peel never removes it from its page: Peel itself, or an agent its maker's own
+ /// uninstaller removes.
+ public var removedElsewhere: RemovedElsewhere? {
+ isPeelItself ? .byRemovePeel : MakersUninstaller.of(self).map(RemovedElsewhere.byItsMaker)
+ }
+
/// What a folder of the app's or its maker's is called, as `Naming.folderName` writes it: the app's names, its
/// identifier, the maker's part of the identifier and that part's last name, and the leading words of the
/// developer its signature names (`BraveSoftware` for "Brave Software, Inc.").
diff --git a/Packages/PeelCore/Sources/PeelCore/Removal/BulkUninstallation.swift b/Packages/PeelCore/Sources/PeelCore/Removal/BulkUninstallation.swift
index ab60d93e..08dc70be 100644
--- a/Packages/PeelCore/Sources/PeelCore/Removal/BulkUninstallation.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Removal/BulkUninstallation.swift
@@ -23,8 +23,9 @@ public struct BulkUninstallation: Sendable {
public var isMeasured = true
/// Needs administrator rights, and the helper may not move it. Shown, never selected, never moved.
public var isBeyondTheHelper = false
- /// Peel or a file of Peel's: Peel is removed only from its own Settings. Shown, never selected, never moved.
- public var isPeels = false
+ /// How an app removed elsewhere is removed instead, for it and its files: Peel by Remove Peel, an agent by its
+ /// maker's uninstaller. Shown, never selected, never moved.
+ public var removedElsewhere: RemovedElsewhere?
/// An app's bundle already in the Trash. Shown, never selected, never counted.
public var isInTheTrash = false
/// The package an app's bundle sits inside (`InstalledApp.enclosingPackage`). Shown, never selected, never
@@ -37,7 +38,8 @@ public struct BulkUninstallation: Sendable {
public var isApplication: Bool { match == nil }
public var isRecommended: Bool {
- guard !isExcluded, !isPeels, !isKeptByMacOS, !isBeyondTheHelper, !isInTheTrash, enclosingPackage == nil
+ guard !isExcluded, removedElsewhere == nil, !isKeptByMacOS, !isBeyondTheHelper, !isInTheTrash,
+ enclosingPackage == nil
else {
return false
}
@@ -71,13 +73,15 @@ public struct BulkUninstallation: Sendable {
self.items = items
total = SizeTotal(movingItemsAt: Dictionary(items
.filter {
- !$0.isExcluded && !$0.isPeels && !($0.isApplication && $0.isKeptByMacOS) && !$0.isBeyondTheHelper
+ !$0.isExcluded && $0.removedElsewhere == nil && !($0.isApplication && $0.isKeptByMacOS)
+ && !$0.isBeyondTheHelper
&& !$0.isInTheTrash && $0.enclosingPackage == nil && $0.match?.heldBack?.cannotBeMoved != true
}
.map { ($0.url, $0.isMeasured ? $0.size : nil) }) { first, _ in first })
privilegedURLs = Set(
items.filter {
- $0.requiresPrivileges && !$0.isExcluded && !$0.isPeels && !$0.isBeyondTheHelper && !$0.isInTheTrash
+ $0.requiresPrivileges && !$0.isExcluded && $0.removedElsewhere == nil && !$0.isBeyondTheHelper
+ && !$0.isInTheTrash
&& $0.enclosingPackage == nil && !($0.isApplication && $0.isKeptByMacOS)
}.map(\.url)
)
@@ -125,7 +129,7 @@ public struct BulkUninstallation: Sendable {
/// another package, or that the helper may not move, and nothing of Peel.
public func selectable(canUseHelper: Bool) -> Set<URL> {
Set(items.filter { item in
- !item.isExcluded && !item.isPeels && !item.isBeyondTheHelper && !item.isInTheTrash
+ !item.isExcluded && item.removedElsewhere == nil && !item.isBeyondTheHelper && !item.isInTheTrash
&& item.enclosingPackage == nil
&& !(item.isApplication && item.isKeptByMacOS) && item.match?.heldBack?.cannotBeMoved != true
&& (canUseHelper || !item.requiresPrivileges)
@@ -150,7 +154,7 @@ public struct BulkUninstallation: Sendable {
/// Returns the selection in the order it is moved: the apps first, then the files. Excluded items and Peel's
/// are left out.
public func removalOrder(of selection: Set<URL>) -> [URL] {
- let movable = items.filter { !$0.isExcluded && !$0.isPeels && selection.contains($0.url) }
+ let movable = items.filter { !$0.isExcluded && $0.removedElsewhere == nil && selection.contains($0.url) }
return movable.filter(\.isApplication).map(\.url) + movable.filter { !$0.isApplication }.map(\.url)
}
@@ -219,7 +223,7 @@ public struct BulkUninstallation: Sendable {
isKeptByMacOS: existing.isKeptByMacOS || item.isKeptByMacOS,
isMeasured: existing.isMeasured || item.isMeasured,
isBeyondTheHelper: existing.isBeyondTheHelper || item.isBeyondTheHelper,
- isPeels: existing.isPeels || item.isPeels,
+ removedElsewhere: existing.removedElsewhere ?? item.removedElsewhere,
isInTheTrash: existing.isInTheTrash || item.isInTheTrash,
enclosingPackage: existing.enclosingPackage ?? item.enclosingPackage,
holdsDamagedSettings: existing.holdsDamagedSettings || item.holdsDamagedSettings
@@ -248,7 +252,7 @@ public struct BulkUninstallation: Sendable {
isKeptByMacOS: uninstallation.app.isSystemProtected,
isMeasured: leftover.isMeasured,
isBeyondTheHelper: leftover.match.heldBack == .beyondTheHelper,
- isPeels: uninstallation.isPeel,
+ removedElsewhere: uninstallation.removedElsewhere,
holdsDamagedSettings: leftover.holdsDamagedSettings
))
}
@@ -264,7 +268,7 @@ public struct BulkUninstallation: Sendable {
isKeptByMacOS: uninstallation.app.isSystemProtected,
isMeasured: uninstallation.isAppMeasured,
isBeyondTheHelper: uninstallation.isAppBeyondTheHelper,
- isPeels: uninstallation.isPeel,
+ removedElsewhere: uninstallation.removedElsewhere,
isInTheTrash: uninstallation.isAppInTheTrash,
enclosingPackage: uninstallation.app.enclosingPackage
))
diff --git a/Packages/PeelCore/Sources/PeelCore/Removal/MakersUninstaller.swift b/Packages/PeelCore/Sources/PeelCore/Removal/MakersUninstaller.swift
new file mode 100644
index 00000000..9ce07520
--- /dev/null
+++ b/Packages/PeelCore/Sources/PeelCore/Removal/MakersUninstaller.swift
@@ -0,0 +1,80 @@
+public import Foundation
+
+/// A security or management agent whose maker documents removing it with an uninstaller of its own. Moved from its
+/// place, what it keeps in the system and the settings that manage it would stay behind.
+public struct MakersUninstaller: Sendable, Hashable {
+ /// What the maker's page says to do.
+ public enum Step: Sendable, Hashable {
+ /// A command to run in Terminal.
+ case command(String)
+ /// An uninstaller to open.
+ case uninstaller(URL)
+ }
+
+ private enum Documented: Sendable {
+ case command(String)
+ case uninstaller(String)
+ case uninstallerInsideTheApp(String)
+ }
+
+ public let maker: String
+ public let step: Step
+ /// The maker's page that says how to remove it.
+ public let instructions: URL
+
+ /// Each product with the signing team and the identifiers its maker's own deployment pages give, and the step and
+ /// page of its maker's uninstall instructions. An identifier names itself and any longer one after a dot.
+ private static let known: [(team: String, identifiers: [String], maker: String, step: Documented, page: String)] = [
+ (
+ "PXPZ95SK77", ["com.paloaltonetworks.globalprotect"], "Palo Alto Networks",
+ .command("sudo /Applications/GlobalProtect.app/Contents/Resources/uninstall_gp.sh"),
+ "https://docs.paloaltonetworks.com/globalprotect/user-guide/6-3/globalprotect-app-for-mac/uninstall-the-globalprotect-app-for-mac"
+ ),
+ (
+ "PXPZ95SK77", ["com.paloaltonetworks.cortex", "com.paloaltonetworks.traps"], "Palo Alto Networks",
+ .uninstaller("/Library/Application Support/PaloAltoNetworks/Traps/bin/Cortex XDR Uninstaller.app"),
+ "https://cortex-docs.paloaltonetworks.com/cortex-xdr-agent/9.2/cortex-xdr-agent-for-macos/uninstall-the-cortex-xdr-agent-for-mac"
+ ),
+ (
+ "DE8Y96K9QP", ["com.cisco.secureclient"], "Cisco",
+ .command("sudo /opt/cisco/secureclient/bin/cisco_secure_client_uninstall.sh"),
+ "https://www.cisco.com/c/en/us/support/docs/security/umbrella/224782-uninstall-secure-client-from-macos.html"
+ ),
+ (
+ "P8DQRXPVLP", ["com.eset.ees"], "ESET", .uninstallerInsideTheApp("Contents/Helpers/Uninstaller.app"),
+ "https://support.eset.com/en/kb6420-uninstall-eset-endpoint-security-for-macos"
+ ),
+ (
+ "UBF8T346G9", ["com.microsoft.wdav"], "Microsoft",
+ .command("sudo '/Library/Application Support/Microsoft/Defender/uninstall/uninstall'"),
+ "https://learn.microsoft.com/en-us/defender-endpoint/mac-resources"
+ ),
+ (
+ "24W52P9M7W", ["com.netskope.client"], "Netskope", .uninstaller("/Applications/Remove Netskope Client.app"),
+ "https://docs.netskope.com/en/uninstalling-the-netskope-client"
+ ),
+ (
+ "AH4XFXJ7DK", ["com.fortinet.forticlient"], "Fortinet",
+ .uninstaller("/Applications/FortiClientUninstaller.app"),
+ "https://community.fortinet.com/t5/FortiGate/Technical-Tip-How-to-uninstall-FortiClient-on-macOS/ta-p/229617"
+ ),
+ ]
+
+ /// The maker's uninstaller for `app`, known by the team of its checked signature and by its identifier, both as
+ /// the maker documents them. An identifier alone is what a bundle says of itself, and would let any app keep Peel
+ /// away from it.
+ static func of(_ app: InstalledApp) -> MakersUninstaller? {
+ guard let team = app.teamIdentifier else { return nil }
+ let identifier = app.bundleIdentifier.lowercased()
+ guard let product = known.first(where: { product in
+ product.team == team && product.identifiers.contains { identifier == $0 || identifier.hasPrefix($0 + ".") }
+ }), let instructions = URL(string: product.page) else { return nil }
+ let step: Step = switch product.step {
+ case .command(let command): .command(command)
+ case .uninstaller(let path): .uninstaller(URL(filePath: path, directoryHint: .isDirectory))
+ case .uninstallerInsideTheApp(let path):
+ .uninstaller(app.url.appending(path: path, directoryHint: .isDirectory))
+ }
+ return MakersUninstaller(maker: product.maker, step: step, instructions: instructions)
+ }
+}
diff --git a/Packages/PeelCore/Sources/PeelCore/Removal/RemovedElsewhere.swift b/Packages/PeelCore/Sources/PeelCore/Removal/RemovedElsewhere.swift
new file mode 100644
index 00000000..0ca663ad
--- /dev/null
+++ b/Packages/PeelCore/Sources/PeelCore/Removal/RemovedElsewhere.swift
@@ -0,0 +1,8 @@
+/// How an app Peel lists, but never removes from its page, is removed instead. Nothing of it is selected, counted,
+/// moved, or handed to the helper.
+public enum RemovedElsewhere: Sendable, Hashable {
+ /// Peel itself: Remove Peel, in Settings, also takes its helper and login item away.
+ case byRemovePeel
+ /// A security or management agent, which its maker's own uninstaller removes whole.
+ case byItsMaker(MakersUninstaller)
+}
diff --git a/Packages/PeelCore/Sources/PeelCore/Removal/Uninstallation.swift b/Packages/PeelCore/Sources/PeelCore/Removal/Uninstallation.swift
index 1d89732b..b4d6c830 100644
--- a/Packages/PeelCore/Sources/PeelCore/Removal/Uninstallation.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Removal/Uninstallation.swift
@@ -20,9 +20,10 @@ public struct Uninstallation: Sendable {
/// it is never selected or counted, and what it left behind still is.
public var isAppInTheTrash = false
public var uninstallsItself: UninstallsItself?
- /// True for Peel, which is removed only from its own Settings, where its helper and login item go first. Its
- /// files are listed, and nothing of it is selected or moved anywhere else: `unreviewedSelection` is that way.
- public var isPeel: Bool { app.isPeelItself }
+ /// How the app is removed when Peel never removes it from here: Peel itself from its own Settings, where its helper
+ /// and login item go first (`unreviewedSelection` is that way), and an agent by its maker's uninstaller. Its files
+ /// are listed, and nothing of it is selected or moved.
+ public var removedElsewhere: RemovedElsewhere? { app.removedElsewhere }
@concurrent
public static func prepare(
@@ -249,11 +250,12 @@ public struct Uninstallation: Sendable {
return (inside.location.kind, components)
}
- /// True when the app itself would stay: excluded, Peel, kept by macOS, part of another package, beyond the
- /// helper, or needing the helper while it is not there. Nothing of it is then selected for the user: while it
- /// stays, its files are not leftovers. For an app macOS keeps, what it holds is data in use.
+ /// True when the app itself would stay: excluded, removed elsewhere, kept by macOS, part of another package,
+ /// beyond the helper, or needing the helper while it is not there. Nothing of it is then selected for the user:
+ /// while it stays, its files are not leftovers. For an app macOS keeps, what it holds is data in use.
public func appStays(canUseHelper: Bool) -> Bool {
- isExcluded || isPeel || app.isSystemProtected || app.enclosingPackage != nil || isAppBeyondTheHelper
+ isExcluded || removedElsewhere != nil || app.isSystemProtected || app.enclosingPackage != nil
+ || isAppBeyondTheHelper
|| (appRequiresPrivileges && !canUseHelper)
}
@@ -271,9 +273,9 @@ public struct Uninstallation: Sendable {
}
/// What a checkbox on the app's page can select: nothing Peel leaves alone or with something excluded inside,
- /// nothing that needs the helper while it cannot act, and nothing of an excluded app or of Peel.
+ /// nothing that needs the helper while it cannot act, and nothing of an excluded app or one removed elsewhere.
public func selectable(canUseHelper: Bool) -> Set<URL> {
- guard !isExcluded, !isPeel else { return [] }
+ guard !isExcluded, removedElsewhere == nil else { return [] }
var urls = Set(scan.leftovers.filter { leftover in
leftover.match.heldBack?.cannotBeMoved != true && (canUseHelper || !leftover.requiresPrivileges)
}.map(\.url))
@@ -316,7 +318,7 @@ public struct Uninstallation: Sendable {
/// How many items could move once selected, and their total size: what a section header shows and the
/// page's total adds up. Rows Peel leaves alone are not counted.
public func movable(among leftovers: [Leftover], withApp: Bool) -> (count: Int, size: SizeTotal) {
- guard !isPeel else { return (0, SizeTotal([])) }
+ guard removedElsewhere == nil else { return (0, SizeTotal([])) }
let movable = leftovers.filter { $0.match.heldBack?.cannotBeMoved != true }
var sizes = Dictionary(movable.map { ($0.url, $0.isMeasured ? $0.size : nil) }) { first, _ in first }
var count = movable.count
@@ -329,7 +331,7 @@ public struct Uninstallation: Sendable {
}
public var privilegedURLs: Set<URL> {
- guard !isExcluded, !isPeel else { return [] }
+ guard !isExcluded, removedElsewhere == nil else { return [] }
var urls = Set(
scan.leftovers.filter { $0.requiresPrivileges && $0.match.heldBack != .beyondTheHelper }.map(\.url)
)
@@ -342,7 +344,7 @@ public struct Uninstallation: Sendable {
/// The app itself, then the selected leftovers.
public func removalOrder(of selection: Set<URL>) -> [URL] {
- guard !isExcluded, !isPeel else { return [] }
+ guard !isExcluded, removedElsewhere == nil else { return [] }
return order(of: selection)
}
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/CommandLineTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/CommandLineTests.swift
index 702574c4..716a1259 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/CommandLineTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/CommandLineTests.swift
@@ -769,8 +769,20 @@ struct CommandLineTests {
#expect(peel.isPeelItself)
#expect(!other.isPeelItself)
- #expect(throws: CommandFailure.self) { try UninstallCommand.refuseIfItIsPeel(peel) }
- try UninstallCommand.refuseIfItIsPeel(other)
+ #expect(throws: CommandFailure.self) { try UninstallCommand.refuseIfRemovedElsewhere(peel) }
+ try UninstallCommand.refuseIfRemovedElsewhere(other)
+ }
+
+ /// A management or security agent goes by its maker's uninstaller, which `peel` names instead of moving it.
+ @Test func refusesToUninstallAnAgentAndNamesItsMakersUninstaller() throws {
+ let agent = InstalledApp(
+ url: URL(filePath: "/Applications/GlobalProtect.app", directoryHint: .isDirectory),
+ bundleIdentifier: "com.paloaltonetworks.GlobalProtect.client", name: "GlobalProtect",
+ teamIdentifier: "PXPZ95SK77"
+ )
+
+ let failure = #expect(throws: CommandFailure.self) { try UninstallCommand.refuseIfRemovedElsewhere(agent) }
+ #expect(failure?.description.contains("uninstall_gp.sh") == true)
}
@Test func refusesToUninstallAnAppInsideAnotherApp() throws {
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/MakersUninstallerTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/MakersUninstallerTests.swift
new file mode 100644
index 00000000..9e9fbe36
--- /dev/null
+++ b/Packages/PeelCore/Tests/PeelCoreTests/MakersUninstallerTests.swift
@@ -0,0 +1,44 @@
+import Foundation
+@testable import PeelCore
+import Testing
+
+struct MakersUninstallerTests {
+ private func agent(_ identifier: String, team: String?, at path: String = "/Applications/Agent.app") -> InstalledApp {
+ InstalledApp(
+ url: URL(filePath: path, directoryHint: .isDirectory), bundleIdentifier: identifier, name: "Agent",
+ teamIdentifier: team
+ )
+ }
+
+ @Test func knowsAnAgentByTheTeamAndTheIdentifierItsMakerDocuments() {
+ let globalProtect = agent("com.paloaltonetworks.GlobalProtect.client", team: "PXPZ95SK77")
+ #expect(
+ MakersUninstaller.of(globalProtect)?.step
+ == .command("sudo /Applications/GlobalProtect.app/Contents/Resources/uninstall_gp.sh")
+ )
+ #expect(MakersUninstaller.of(agent("com.paloaltonetworks.cortex.agent", team: "PXPZ95SK77")) != nil)
+ #expect(MakersUninstaller.of(agent("com.cisco.secureclient.gui", team: "DE8Y96K9QP"))?.maker == "Cisco")
+ #expect(MakersUninstaller.of(agent("com.microsoft.wdav", team: "UBF8T346G9"))?.maker == "Microsoft")
+ #expect(MakersUninstaller.of(agent("com.netskope.client.Netskope-Client", team: "24W52P9M7W")) != nil)
+ #expect(MakersUninstaller.of(agent("com.fortinet.FortiClient", team: "AH4XFXJ7DK")) != nil)
+ let eset = agent("com.eset.ees.g2", team: "P8DQRXPVLP", at: "/Applications/ESET Endpoint Security.app")
+ #expect(
+ MakersUninstaller.of(eset)?.step == .uninstaller(
+ URL(
+ filePath: "/Applications/ESET Endpoint Security.app/Contents/Helpers/Uninstaller.app",
+ directoryHint: .isDirectory
+ )
+ )
+ )
+ }
+
+ /// An identifier is what a bundle says of itself: alone, it would let any app keep Peel away. The team comes
+ /// from the checked signature, and a maker's other apps share it.
+ @Test func neitherTheIdentifierNorTheTeamIsEnoughAlone() {
+ #expect(MakersUninstaller.of(agent("com.paloaltonetworks.GlobalProtect.client", team: nil)) == nil)
+ #expect(MakersUninstaller.of(agent("com.paloaltonetworks.GlobalProtect.client", team: "ABCDE12345")) == nil)
+ #expect(MakersUninstaller.of(agent("com.microsoft.Word", team: "UBF8T346G9")) == nil)
+ #expect(MakersUninstaller.of(agent("com.microsoft.wdavx", team: "UBF8T346G9")) == nil)
+ #expect(MakersUninstaller.of(agent("com.cisco.webexmeetingsapp", team: "DE8Y96K9QP")) == nil)
+ }
+}
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/UninstallationTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/UninstallationTests.swift
index b83e758b..572ece3d 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/UninstallationTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/UninstallationTests.swift
@@ -34,6 +34,27 @@ struct UninstallationTests {
)
}
+ /// A management or security agent goes by its maker's uninstaller, so like Peel itself it is listed and nothing of
+ /// it is selected, counted, moved, or handed to the helper.
+ @Test func leavesAnAgentAndItsFilesToItsMakersUninstaller() {
+ let agent = InstalledApp(
+ url: URL(filePath: "/Applications/GlobalProtect.app", directoryHint: .isDirectory),
+ bundleIdentifier: "com.paloaltonetworks.GlobalProtect.client", name: "GlobalProtect",
+ teamIdentifier: "PXPZ95SK77"
+ )
+ let daemon = leftover("com.paloaltonetworks.gp.pangpsd.plist", requiresPrivileges: true)
+ let support = leftover("com.paloaltonetworks.GlobalProtect.client")
+ let plan = uninstallation(app: agent, appRequiresPrivileges: true, leftovers: [daemon, support])
+
+ #expect(plan.removedElsewhere != nil)
+ #expect(plan.appStays(canUseHelper: true))
+ #expect(plan.suggestedSelection(canUseHelper: true).isEmpty)
+ #expect(plan.selectable(canUseHelper: true).isEmpty)
+ #expect(plan.movable(among: plan.scan.leftovers, withApp: true).count == 0)
+ #expect(plan.privilegedURLs.isEmpty)
+ #expect(plan.removalOrder(of: [agent.url, daemon.url, support.url]).isEmpty)
+ }
+
/// When an app removes itself, nobody reviews a list first, so a match on its name is not enough. Only what
/// is certainly its own or named inside its own identifier goes, and nothing that needs the helper. If the
/// app itself needs the helper, nothing goes at all.
@@ -208,7 +229,7 @@ struct UninstallationTests {
let own = leftover("com.tuguidragos.Peel")
let plan = uninstallation(app: peel, leftovers: [own])
- #expect(plan.isPeel)
+ #expect(plan.removedElsewhere == .byRemovePeel)
#expect(plan.suggestedSelection(canUseHelper: true).isEmpty)
#expect(plan.removalOrder(of: [peel.url, own.url]).isEmpty)
#expect(plan.movable(among: [own], withApp: true).count == 0)
@@ -219,7 +240,7 @@ struct UninstallationTests {
let bulk = BulkUninstallation(uninstallations: [plan, uninstallation(leftovers: [example])])
#expect(bulk.suggestedSelection(canUseHelper: true) == [app.url, example.url])
#expect(bulk.removalOrder(of: [peel.url, own.url, app.url, example.url]) == [app.url, example.url])
- #expect(Set(bulk.items.filter(\.isPeels).map(\.url)) == [peel.url, own.url])
+ #expect(Set(bulk.items.filter { $0.removedElsewhere == .byRemovePeel }.map(\.url)) == [peel.url, own.url])
#expect(bulk.total.known == 11_000, "Peel's files were counted as something to remove")
}
diff --git a/Peel/Model/RemovalPlan.swift b/Peel/Model/RemovalPlan.swift
index 7b5d65fa..13d93cbd 100644
--- a/Peel/Model/RemovalPlan.swift
+++ b/Peel/Model/RemovalPlan.swift
@@ -76,9 +76,9 @@ final class RemovalPlan {
uninstallation?.isAppInTheTrash ?? false
}
- /// Known before the scan, so the page says from the start that Peel removes itself in Settings.
- var isPeel: Bool {
- app.isPeelItself
+ /// Known before the scan, so the page says from the start how the app is removed instead.
+ var removedElsewhere: RemovedElsewhere? {
+ app.removedElsewhere
}
/// What a confirmation would ask about now: the selection, with the sizes this scan measured.
diff --git a/Peel/Views/AppDetailView.swift b/Peel/Views/AppDetailView.swift
index 8040d2d2..0c62b449 100644
--- a/Peel/Views/AppDetailView.swift
+++ b/Peel/Views/AppDetailView.swift
@@ -117,7 +117,7 @@ struct AppDetailView: View {
}
.listRowSeparator(.hidden)
}
- if plan.isPeel {
+ if plan.removedElsewhere == .byRemovePeel {
Notice(
title: Text("Peel removes itself in Settings"),
detail: Text("Remove Peel, in Settings > General, removes its helper and login item as well. Moved from here, Peel would leave them behind."),
@@ -127,6 +127,10 @@ struct AppDetailView: View {
}
.listRowSeparator(.hidden)
}
+ if case .byItsMaker(let uninstaller) = plan.removedElsewhere {
+ MakersUninstallerNotice(app: plan.app.name, uninstaller: uninstaller)
+ .listRowSeparator(.hidden)
+ }
if case .browser(let identifier) = plan.app.webApp {
let browser = library.name(forBundleIdentifier: identifier)
Notice(
@@ -176,7 +180,7 @@ struct AppDetailView: View {
if PrivacyReset.isAllowed(bundleIdentifier: plan.app.bundleIdentifier), !plan.isAppInTheTrash {
PrivacyResetRow(isOn: $resetsPrivacy, detail: PrivacyResetRow.beforeTheMove)
}
- if plan.hasDockTile, !plan.isPeel {
+ if plan.hasDockTile, plan.removedElsewhere == nil {
DockTileRow(isOn: $removesDockTile)
}
defaultsSection
@@ -264,7 +268,7 @@ struct AppDetailView: View {
isLocked: plan.appRequiresPrivileges && !helper.canAct,
isExcluded: plan.isExcluded,
isLeftAlone: plan.app.isSystemProtected || plan.app.enclosingPackage != nil || plan.isAppBeyondTheHelper
- || plan.isAppInTheTrash || plan.isPeel,
+ || plan.isAppInTheTrash || plan.removedElsewhere != nil,
appIdentifier: plan.app.bundleIdentifier,
selection: plan, isSelected: plan.isSelected(plan.app.url)
)
@@ -325,8 +329,8 @@ struct AppDetailView: View {
}
private var appWarning: String? {
- if plan.isPeel {
- return String(localized: "Left alone: Peel removes itself only from Settings.")
+ if let removedElsewhere = plan.removedElsewhere {
+ return String(localized: removedElsewhere.explanation)
}
if plan.app.isSystemProtected {
return String(localized: "macOS keeps this app, so it stays where it is.")
@@ -382,7 +386,7 @@ struct AppDetailView: View {
size: leftover.size,
isMeasured: leftover.isMeasured,
isLocked: leftover.requiresPrivileges && !helper.canAct,
- isLeftAlone: leftover.match.heldBack?.cannotBeMoved == true || plan.isPeel,
+ isLeftAlone: leftover.match.heldBack?.cannotBeMoved == true || plan.removedElsewhere != nil,
selection: plan, isSelected: plan.isSelected(leftover.url)
)
}
@@ -401,8 +405,8 @@ struct AppDetailView: View {
if leftover.holdsDamagedSettings {
lines.append(String(localized: "Can’t be read as a property list, so nothing can read these settings."))
}
- if plan.isPeel {
- lines.append(String(localized: "Left alone: Peel removes itself only from Settings."))
+ if let removedElsewhere = plan.removedElsewhere {
+ lines.append(String(localized: removedElsewhere.explanation))
}
return lines.isEmpty ? nil : lines.joined(separator: "\n\n")
}
diff --git a/Peel/Views/MakersUninstallerNotice.swift b/Peel/Views/MakersUninstallerNotice.swift
new file mode 100644
index 00000000..f40dac49
--- /dev/null
+++ b/Peel/Views/MakersUninstallerNotice.swift
@@ -0,0 +1,26 @@
+import PeelCore
+import SwiftUI
+
+/// The note on the page of a security or management agent: its maker's own uninstaller removes it whole, so Peel
+/// leaves it and its files where they are and offers the maker's step and instructions instead.
+struct MakersUninstallerNotice: View {
+ let app: String
+ let uninstaller: MakersUninstaller
+
+ var body: some View {
+ Notice(
+ title: Text("Removed with \(uninstaller.maker)’s own uninstaller"),
+ detail: Text("\(uninstaller.maker) documents removing \(app) with its own uninstaller, which also takes what it keeps in the system and the settings that manage it. Moved from here, those would stay behind, so Peel leaves it and its files where they are."),
+ kind: .note
+ ) {
+ switch uninstaller.step {
+ case .command(let command):
+ CopyButton(text: command, title: "Copy Uninstall Command")
+ case .uninstaller(let url):
+ Button("Open Uninstaller") { NSWorkspace.shared.open(url) }
+ .disabled(!FileManager.default.fileExists(atPath: url.path(percentEncoded: false)))
+ }
+ Link("\(uninstaller.maker)’s Instructions", destination: uninstaller.instructions)
+ }
+ }
+}
diff --git a/Peel/Views/MultipleAppsView.swift b/Peel/Views/MultipleAppsView.swift
index 722c9f4a..9d6de520 100644
--- a/Peel/Views/MultipleAppsView.swift
+++ b/Peel/Views/MultipleAppsView.swift
@@ -238,7 +238,7 @@ struct MultipleAppsView: View {
isExcluded: item.isApplication && item.isExcluded,
isLeftAlone: item.match?.heldBack?.cannotBeMoved == true || item.isBeyondTheHelper
|| (item.isApplication && item.isKeptByMacOS)
- || item.isPeels || item.isInTheTrash || item.enclosingPackage != nil,
+ || item.removedElsewhere != nil || item.isInTheTrash || item.enclosingPackage != nil,
appIdentifier: item.isApplication ? item.apps.first : nil,
isFirst: isFirst,
selection: plan, isSelected: plan.isSelected(item.url)
@@ -255,7 +255,7 @@ struct MultipleAppsView: View {
private func warning(for item: BulkUninstallation.Item) -> String? {
var lines: [String] = []
let keptBy = item.apps.filter(plan.staying.contains)
- if !item.isApplication, !keptBy.isEmpty, !item.isKeptByMacOS, !item.isPeels, !item.isExcluded {
+ if !item.isApplication, !keptBy.isEmpty, !item.isKeptByMacOS, item.removedElsewhere == nil, !item.isExcluded {
lines.append(String(localized: "Not selected: it stays with \(names(of: keptBy))."))
}
let users =
@@ -272,8 +272,8 @@ struct MultipleAppsView: View {
if item.isApplication, item.isBeyondTheHelper {
lines.append(String(localized: HoldBack.beyondTheHelper.explanation))
}
- if item.isPeels {
- lines.append(String(localized: "Left alone: Peel removes itself only from Settings."))
+ if let removedElsewhere = item.removedElsewhere {
+ lines.append(String(localized: removedElsewhere.explanation))
}
if item.isInTheTrash {
lines.append(String(localized: "Already in the Trash. What it left behind can still go."))
diff --git a/Peel/Views/Presentation.swift b/Peel/Views/Presentation.swift
index b5080792..1282b328 100644
--- a/Peel/Views/Presentation.swift
+++ b/Peel/Views/Presentation.swift
@@ -211,6 +211,16 @@ extension CloudRefusal {
}
}
+extension RemovedElsewhere {
+ /// Why a row of an app Peel never removes from its page stays where it is.
+ var explanation: LocalizedStringResource {
+ switch self {
+ case .byRemovePeel: "Left alone: Peel removes itself only from Settings."
+ case .byItsMaker(let uninstaller): "Left alone: \(uninstaller.maker)’s own uninstaller removes it."
+ }
+ }
+}
+
extension HoldBack {
/// Why Peel did not select an item, or leaves it where it is. It is shown in the note beside the row, with
/// the reason for the match.
diff --git a/SAFETY.md b/SAFETY.md
index 314195ec..c5d2b30e 100644
--- a/SAFETY.md
+++ b/SAFETY.md
@@ -254,6 +254,14 @@ Only matches Peel is `certain` or `likely` about, and only when nothing else ins
`Application Support/<Maker>`, that an uninstall leaves empty goes to the Trash with it; one with anything left
inside, a hidden file included, one with another name, and the Library folder itself stay.
+A security or management agent whose maker documents removing it with an uninstaller of its own (GlobalProtect and
+Cortex XDR, Cisco Secure Client, ESET Endpoint Security, Microsoft Defender, Netskope Client and FortiClient) is
+listed the same way, and nothing of it can be selected: its page names the maker's uninstaller and links to the
+maker's instructions, since moved from its place, what it keeps in the system and the settings that manage it would
+stay behind. Peel knows it by the team its checked signature names and by its identifier, both as the maker
+documents them, never by the identifier alone, which any app could claim. `peel uninstall` refuses it and names the
+same uninstaller.
+
Peel itself is listed on its own page with what it keeps, and nothing of it can be selected there or among other
apps. It is removed only from Settings: by Remove Peel, which takes its helper and login item away first, or,
for a copy Homebrew installed, by the Homebrew command Settings shows in its place.