Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.
Swift cache-cleanercleanerclideveloper-toolsdisk-cleanupdisk-spaceduplicate-finderhomebrewliquid-glassmac-cleanermacosmacos-appmacos-golden-gatemacos-tahoemacos-tweaksswiftswiftuiterminal-themesuninstalluninstaller
Leave AnyConnect and Symantec Endpoint Protection to their makers
Țugui Dragoș002ce15f5595
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 324217b5..dcc4b167 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -29,6 +29,8 @@ its changes the way [Keep a Changelog](https://keepachangelog.com/) suggests.uninstaller on its disk image.- Zscaler Client Connector and Arq are left to their makers' own uninstallers: Zscaler's asks for the uninstall passwordyour organization set, and Arq's asks whether to delete its backup settings.+- Cisco AnyConnect, and Secure Client up to 5.1.2, are left to Cisco's uninstall script, the one that is on your Mac,+ and Symantec Endpoint Protection to the uninstall command in its own window.- After a removal, Peel reads the files your shell runs when it starts and names the lines that still point to whatmoved, such as a `PATH` entry or an alias into the app, in the alert and in `peel uninstall`. It changes none of thesefiles.diff --git a/Packages/PeelCore/Sources/PeelCore/Removal/MakersUninstaller.swift b/Packages/PeelCore/Sources/PeelCore/Removal/MakersUninstaller.swiftindex f325cf57..0c5a07a2 100644--- a/Packages/PeelCore/Sources/PeelCore/Removal/MakersUninstaller.swift+++ b/Packages/PeelCore/Sources/PeelCore/Removal/MakersUninstaller.swift@@ -24,6 +24,9 @@ public struct MakersUninstaller: Sendable, Hashable {case itself(removing: String)case inTheAppcase onItsDiskImage+ /// The first script, run with `sudo`, with its own page while it is on the Mac, and the other one, with the+ /// product's page, when it is not.+ case scriptOnTheMac(String, page: String, otherwise: String)}public let maker: String@@ -105,6 +108,20 @@ public struct MakersUninstaller: Sendable, Hashable {"WQXXM75BYN", ["com.electron.ivpn-ui", "net.ivpn.client"], "IVPN", .onItsDiskImage,"https://www.ivpn.net/knowledgebase/macos/macos-how-do-i-completely-uninstall-or-remove-the-ivpn-application/"),+ // AnyConnect 4 and Secure Client up to 5.1.2 share this identifier; the script on the Mac says which it is.+ (+ "DE8Y96K9QP", ["com.cisco.anyconnect.gui"], "Cisco",+ .scriptOnTheMac(+ "/opt/cisco/secureclient/bin/cisco_secure_client_uninstall.sh",+ page: "https://www.cisco.com/c/en/us/support/docs/security/umbrella/224782-uninstall-secure-client-from-macos.html",+ otherwise: "/opt/cisco/anyconnect/bin/vpn_uninstall.sh"+ ),+ "https://www.cisco.com/c/en/us/td/docs/security/vpn_client/anyconnect/anyconnect410/administration/guide/b-anyconnect-admin-guide-4-10/deploy-anyconnect.html"+ ),+ (+ "9PTGMPNXZ2", ["com.symantec.sep.mainapp"], "Symantec", .inTheApp,+ "https://knowledge.broadcom.com/external/article/156148"+ ),// Zscaler's guide for deploying with Jamf names the team and `com.zscaler` as the prefix of its apps.("PCBCQZJ7S7", ["com.zscaler"], "Zscaler",@@ -126,20 +143,27 @@ public struct MakersUninstaller: Sendable, Hashable {/// 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? {+ static func of(+ _ app: InstalledApp,+ isOnTheMac: (String) -> Bool = { FileManager.default.fileExists(atPath: $0) }+ ) -> MakersUninstaller? {guard let team = app.teamIdentifier, let identifier = app.bundleIdentifier?.lowercased() else { return nil }guard let product = known.first(where: { product inproduct.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))+ }) else { return nil }+ let chosen: (step: Step, page: String) = switch product.step {+ case .command(let command): (.command(command), product.page)+ case .uninstaller(let path): (.uninstaller(URL(filePath: path, directoryHint: .isDirectory)), product.page)case .uninstallerInsideTheApp(let path):- .uninstaller(app.url.appending(path: path, directoryHint: .isDirectory))- case .itself: .uninstaller(app.url)- case .inTheApp: .inTheApp(app.url)- case .onItsDiskImage: .onItsDiskImage+ (.uninstaller(app.url.appending(path: path, directoryHint: .isDirectory)), product.page)+ case .itself: (.uninstaller(app.url), product.page)+ case .inTheApp: (.inTheApp(app.url), product.page)+ case .onItsDiskImage: (.onItsDiskImage, product.page)+ case .scriptOnTheMac(let script, let page, let otherwise):+ isOnTheMac(script) ? (.command("sudo \(script)"), page) : (.command("sudo \(otherwise)"), product.page)}+ guard let instructions = URL(string: chosen.page) else { return nil }+ let step = chosen.steplet removes: String? = if case .itself(let removing) = product.step { removing } else { nil }return MakersUninstaller(maker: product.maker, step: step, instructions: instructions, removes: removes)}diff --git a/Packages/PeelCore/Tests/PeelCoreTests/MakersUninstallerTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/MakersUninstallerTests.swiftindex f14c4a45..66fb4bea 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/MakersUninstallerTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/MakersUninstallerTests.swift@@ -75,6 +75,25 @@ struct MakersUninstallerTests {#expect(MakersUninstaller.of(agent("com.zscaler.zscaler", team: "ABCDE12345")) == nil)}+ @Test func givesTheUninstallScriptOfTheCiscoClientThatIsOnTheMac() {+ let anyConnect = agent("com.cisco.anyconnect.gui", team: "DE8Y96K9QP")+ let secureClient = "/opt/cisco/secureclient/bin/cisco_secure_client_uninstall.sh"++ let found = MakersUninstaller.of(anyConnect) { $0 == secureClient }+ #expect(found?.step == .command("sudo \(secureClient)"))+ #expect(found?.instructions.absoluteString.contains("224782") == true)+ let older = MakersUninstaller.of(anyConnect) { _ in false }+ #expect(older?.step == .command("sudo /opt/cisco/anyconnect/bin/vpn_uninstall.sh"))+ #expect(older?.instructions.absoluteString.contains("anyconnect410") == true)+ }++ @Test func knowsSymantecEndpointProtectionByTheTeamItsSignatureNames() {+ let symantec = agent("com.symantec.sep.mainapp", team: "9PTGMPNXZ2", at: "/Applications/Symantec Solutions/Symantec Endpoint Protection.app")++ #expect(MakersUninstaller.of(symantec)?.step == .inTheApp(symantec.url))+ #expect(MakersUninstaller.of(agent("com.symantec.sep.mainapp", team: "ABCDE12345")) == nil)+ }+@Test func knowsAnUninstallerItsMakerDocumentsOpeningToRemoveAProduct() {let path = "/Applications/Chrome Remote Desktop Host Uninstaller.app"let uninstaller = agent("com.google.chromeremotedesktop.me2me-host-uninstaller", team: "EQHXZ8M8AV", at: path)diff --git a/SAFETY.md b/SAFETY.mdindex 251d5f66..dfef7798 100644--- a/SAFETY.md+++ b/SAFETY.md@@ -331,9 +331,10 @@ Only matches Peel is `certain` or `likely` about, and only when nothing else insand the Library folder itself stay.A security or management agent, a VPN, or a backup app whose maker documents removing it with an uninstaller of its-own (GlobalProtect, Cortex XDR, Cisco Secure Client, ESET Endpoint Security, Microsoft Defender, Netskope Client,-FortiClient, Bitdefender Endpoint Security for Mac, Sophos Endpoint, Zscaler Client Connector, ExpressVPN, Private-Internet Access, Cloudflare WARP, ZeroTier, Tunnelblick, IVPN, and Arq) is listed the same way, and nothing of it can be selected: its page names the+own (GlobalProtect, Cortex XDR, Cisco Secure Client and AnyConnect, ESET Endpoint Security, Microsoft Defender,+Netskope Client, FortiClient, Bitdefender Endpoint Security for Mac, Sophos Endpoint, Symantec Endpoint Protection,+Zscaler Client Connector, ExpressVPN, Private Internet Access, Cloudflare WARP, ZeroTier, Tunnelblick, IVPN, and Arq)+is listed the same way, and nothing of it can be selected: its page names themaker's uninstaller, or opens the app whose own command removes it, and links to the maker's instructions, since movedfrom its place, what it keeps in the system and the settings that manage it would stay behind. Peel knows it by theteam its checked signature names and by its identifier, both as the maker documents or signs them, never by the