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 game saves, databases and app backups for the person to choose
Țugui Dragoș9468f9962bfd
diff --git a/GUIDE.md b/GUIDE.mdindex 3bd8fa4f..25530598 100644--- a/GUIDE.md+++ b/GUIDE.md@@ -19,7 +19,8 @@ and how to get it, [SAFETY.md](SAFETY.md) what it protects, [PRIVACY.md](PRIVACYHomebrew stops listing the app once it is gone.- **What may exist nowhere else is left to you.** A folder holding a crypto wallet, a signing key, a passworddatabase, or a repository is shown with its reason and not selected, and so is a place where an app keeps what- may exist only on this Mac, such as local mail, message history, sign-in codes, or VPN connections.+ may exist only on this Mac, such as local mail, message history, sign-in codes, VPN connections, a game's saves, a+ database, or an app's own backups.- **Shared or guessed, never selected.** A file another installed app also uses is shown but never selected. WhatPeel only guesses at, from the start of a name or an identifier the app's maker or signing team also uses, waitsunder Review Before Removing.diff --git a/Localization/Peel/Localizable.xcstrings b/Localization/Peel/Localizable.xcstringsindex 6bb7fae8..a53fa776 100644--- a/Localization/Peel/Localizable.xcstrings+++ b/Localization/Peel/Localizable.xcstrings@@ -88668,6 +88668,112 @@}}},+ "Not selected: this holds what you made with the app, such as saved games, databases, or the app’s own backups, which may exist only on this Mac. Once the Trash is emptied, it’s gone for good unless you have another copy." : {+ "localizations" : {+ "cs" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Nevybráno: obsahuje, co jste v aplikaci vytvořili a co může existovat jen v tomto Macu, například uložené hry, databáze nebo vlastní zálohy aplikace. Jakmile se koš vysype, bude to trvale ztraceno, pokud nemáte jinou kopii."+ }+ },+ "de" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Nicht ausgewählt: Dieses Objekt enthält, was du mit der App erstellt hast und was es möglicherweise nur auf diesem Mac gibt, etwa Spielstände, Datenbanken oder die eigenen Backups der App. Sobald der Papierkorb entleert ist, ist es endgültig verloren, sofern du keine weitere Kopie hast."+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Sin seleccionar: contiene lo que has creado con la app, como partidas guardadas, bases de datos o las copias de seguridad que hace la propia app, algo que puede que solo exista en este Mac. En cuanto se vacíe la papelera, se perderá definitivamente, salvo que tengas otra copia."+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Non sélectionné : il contient ce que vous avez créé avec l’app, comme des parties enregistrées, des bases de données ou les sauvegardes propres à l’app, qui n’existent peut-être que sur ce Mac. Une fois la corbeille vidée, tout cela est perdu définitivement, sauf si vous en avez une autre copie."+ }+ },+ "it" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Non selezionato: contiene ciò che hai creato con l’app, come partite salvate, database o i backup eseguiti dall’app stessa, che potrebbero esistere solo su questo Mac. Una volta svuotato il Cestino, sono persi definitivamente, a meno che tu non abbia un’altra copia."+ }+ },+ "ja" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "未選択: ここには、ゲームのセーブデータ、データベース、アプリ自身が保存したバックアップなど、このアプリで作成したデータが含まれており、このMacにしか存在しない可能性があります。ゴミ箱を空にすると、別のコピーがない限り、二度と取り戻せなくなります。"+ }+ },+ "ko" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "선택되지 않음: 저장된 게임, 데이터베이스 또는 앱 자체 백업처럼 사용자가 앱으로 만든 데이터가 들어 있으며, 이 데이터는 이 Mac에만 있을 수 있습니다. 휴지통을 비우면 다른 복사본이 없는 한 영구적으로 사라집니다."+ }+ },+ "nl" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Niet geselecteerd: dit bevat wat je met de app hebt gemaakt, zoals opgeslagen games, databases of de eigen back-ups van de app, die misschien alleen op deze Mac staan. Zodra de prullenmand is geleegd, is het definitief weg, tenzij je er nog een kopie van hebt."+ }+ },+ "pl" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Nie zaznaczono: zawiera to, co utworzono w aplikacji, na przykład zapisane gry, bazy danych lub jej własne backupy, które mogą istnieć tylko na tym Macu. Po opróżnieniu Kosza przepadną na zawsze, chyba że masz ich kopię gdzie indziej."+ }+ },+ "pt" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Não selecionado: este item contém o que você criou com o app, como jogos salvos, bancos de dados ou os backups do próprio app, que podem existir só neste Mac. Depois que o Lixo for esvaziado, eles se perdem definitivamente, a menos que você tenha outra cópia."+ }+ },+ "ro" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Neselectat: acest articol conține ce ați creat cu aplicația, cum ar fi jocuri salvate, baze de date sau backupurile proprii ale aplicației, care pot exista doar pe acest Mac. După golirea Coșului, acestea se pierd definitiv, dacă nu aveți o altă copie."+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Не выбрано: здесь хранится то, что Вы создали в приложении, например сохранения игр, базы данных или собственные резервные копии приложения, и, возможно, это есть только на этом Mac. После очистки Корзины все это будет потеряно безвозвратно, если у Вас нет другой копии."+ }+ },+ "sv" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Inte markerad: den innehåller det du har skapat med appen, till exempel sparade spel, databaser eller appens egna säkerhetskopior, som kanske bara finns på den här datorn. När papperskorgen har tömts är det borta för alltid, om du inte har en annan kopia."+ }+ },+ "tr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Seçilmedi: bu, kayıtlı oyunlar, veritabanları veya uygulamanın kendi yedeklemeleri gibi, uygulamayla oluşturduğunuz ve yalnızca bu Mac’te bulunabilecek şeyleri içerir. Çöp Sepeti boşaltıldığında, başka bir kopyanız yoksa bunlar kalıcı olarak gider."+ }+ },+ "uk" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Не вибрано: тут зберігається те, що ви створили в програмі і що може існувати лише на цьому Mac, як-от збереження ігор, бази даних або власні резервні копії програми. Коли Смітник буде очищено, це буде втрачено назавжди, якщо у вас немає іншої копії."+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "未选择:此处存有你用此App创作、可能仅存在于这台Mac上的内容,例如游戏存档、数据库或App自己的备份。一旦清倒废纸篓,除非你另有副本,否则这些内容将永久丢失。"+ }+ },+ "zh-Hant" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "未選取:其中存有你用此App製作、可能只存在於這部Mac上的內容,例如遊戲存檔、資料庫或App自己的備份。一旦清空「垃圾桶」,除非你有另一份副本,否則這些內容就會永久消失。"+ }+ }+ }+ },"Not selected: this is in a folder an app keeps in Application Support, and the app may still need it." : {"localizations" : {"cs" : {diff --git a/Packages/PeelCore/Sources/PeelCommandLine/Support/Output.swift b/Packages/PeelCore/Sources/PeelCommandLine/Support/Output.swiftindex d80dd80a..adaedcfa 100644--- a/Packages/PeelCore/Sources/PeelCommandLine/Support/Output.swift+++ b/Packages/PeelCore/Sources/PeelCommandLine/Support/Output.swift@@ -324,6 +324,8 @@ extension HoldBack {case .holdsMessageHistory: "holds message history that may exist only on this Mac"case .holdsPasswordsOrCodes: "holds passwords or sign-in codes that may exist only on this Mac"case .holdsVPNConnections: "holds VPN connections that may exist only on this Mac"+ case .holdsWorkMadeWithTheApp:+ "holds what you made with the app, such as saved games, databases, or its backups, that may exist only here"case .holdsKeys: "holds a wallet or a key Peel protects"case .holdsWorkKeptInACache: "holds work an app keeps nowhere else, such as an editor's local history"case .insideAnotherAppsFolder: "inside another app's folder"diff --git a/Packages/PeelCore/Sources/PeelCore/Leftovers/KeptOnlyHere.swift b/Packages/PeelCore/Sources/PeelCore/Leftovers/KeptOnlyHere.swiftindex 1cd156a7..92685b2b 100644--- a/Packages/PeelCore/Sources/PeelCore/Leftovers/KeptOnlyHere.swift+++ b/Packages/PeelCore/Sources/PeelCore/Leftovers/KeptOnlyHere.swift@@ -2,8 +2,9 @@ import Foundationinternal import PeelPrivileged/// Where apps keep what may exist only on this Mac: local mail, message history, password vaults and sign-in codes,-/// and VPN connections. A folder at or inside one, or the app's folder that holds one, is shown and never selected-/// for the person, who can still select it.+/// VPN connections, and what the person made with an app, such as saved games, databases, and the app's own backups.+/// A folder at or inside one, or the app's folder that holds one, is shown and never selected for the person, who+/// can still select it.enum KeptOnlyHere {static let places: [(folder: String, inside: String?, reason: HoldBack)] = [// Airmail's help, "Backup and restore Airmail for macOS".@@ -38,6 +39,12 @@ enum KeptOnlyHere {("Library/Application Support/Tunnelblick", "Configurations", .holdsVPNConnections),// SparkLabs' "Uninstalling Viscosity (Mac)": connection data.("Library/Application Support/Viscosity", nil, .holdsVPNConnections),+ // Steam Support's "Steam Cloud": cloud files are kept here by default, and with Steam Cloud off a game's saves+ // are kept only here.+ ("Library/Application Support/Steam", "userdata", .holdsWorkMadeWithTheApp),+ // Postgres.app's "Installing Postgres.app": its default data directory is `Postgres/var-XX`, and deleting the+ // data directories is an optional step of uninstalling it.+ ("Library/Application Support/Postgres", nil, .holdsWorkMadeWithTheApp),]static func reason(for path: String, home: String) -> HoldBack? {@@ -48,6 +55,8 @@ enum KeptOnlyHere {let place = folder + (inside.map { PathComponents.of($0.lowercased()) } ?? [])if item.starts(with: place) || item == folder { return reason }}- return nil+ // What an app names as its backups is a copy the person may need, whichever app made it.+ let words = (item.last ?? "").split { !$0.isLetter }+ return words.contains("backup") || words.contains("backups") ? .holdsWorkMadeWithTheApp : nil}}diff --git a/Packages/PeelCore/Sources/PeelCore/Leftovers/Leftover.swift b/Packages/PeelCore/Sources/PeelCore/Leftovers/Leftover.swiftindex 0b088b52..e607b5c4 100644--- a/Packages/PeelCore/Sources/PeelCore/Leftovers/Leftover.swift+++ b/Packages/PeelCore/Sources/PeelCore/Leftovers/Leftover.swift@@ -67,6 +67,9 @@ public enum HoldBack: String, Sendable, Hashable {case holdsPasswordsOrCodes/// VPN connections, with their keys and certificates, that may exist only on this Mac (`KeptOnlyHere`).case holdsVPNConnections+ /// What the person made with the app, such as saved games, databases, or the app's own backups, that may exist+ /// only on this Mac (`KeptOnlyHere`).+ case holdsWorkMadeWithTheApp/// A wallet or a key `ProtectedData` names is inside, and `RemovalGuard` refuses to move the folder around it.case holdsKeys/// Work kept nowhere else is inside a cache folder, such as an editor's local history of the person's files, anddiff --git a/Packages/PeelCore/Tests/PeelCoreTests/KeptOnlyHereTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/KeptOnlyHereTests.swiftindex de748316..d1ce5980 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/KeptOnlyHereTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/KeptOnlyHereTests.swift@@ -19,6 +19,11 @@ struct KeptOnlyHereTests {("Library/Containers/io.ente.auth.mac", .holdsPasswordsOrCodes),("Library/Application Support/Tunnelblick/Configurations/work.tblk", .holdsVPNConnections),("Library/Application Support/Viscosity", .holdsVPNConnections),+ ("Library/Application Support/Steam", .holdsWorkMadeWithTheApp),+ ("Library/Application Support/Steam/userdata/123/570/remote", .holdsWorkMadeWithTheApp),+ ("Library/Application Support/Postgres/var-17", .holdsWorkMadeWithTheApp),+ ("Library/Application Support/.com.example.notes.backups", .holdsWorkMadeWithTheApp),+ ("Library/Application Support/Example/Backups", .holdsWorkMadeWithTheApp),]for (path, reason) in held {#expect(KeptOnlyHere.reason(for: "\(home)/\(path)", home: home) == reason, "\(path)")@@ -32,6 +37,7 @@ struct KeptOnlyHereTests {"Library/Group Containers/group.strongbox.mac.mcguill/Library/Caches","Library/Application Support/Tunnelblick/Logs", "Library/Logs/Viscosity","Library/Group Containers/group.net.whatsapp.family",+ "Library/Application Support/Steam Link", "Library/Caches/Postgres", "Library/Application Support/Backupify",]for path in free {#expect(KeptOnlyHere.reason(for: "\(home)/\(path)", home: home) == nil, "\(path)")diff --git a/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swiftindex 22fa1a67..463a5a79 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swift@@ -46,7 +46,10 @@ struct LeftoverScannerTests {let plan = await Uninstallation.prepare(app, installedApps: [app], environment: environment)let backups = try #require(plan.scan.leftovers.first { $0.url.lastPathComponent == ".org.example.app.backups" })- #expect(plan.suggestedSelection(canUseHelper: false).contains(backups.url))+ #expect(backups.match.reason == .bundleIdentifierPrefix)+ // Backups are a copy the person may need: found as the app's, and left for the person to select.+ #expect(backups.match.heldBack == .holdsWorkMadeWithTheApp)+ #expect(!plan.suggestedSelection(canUseHelper: false).contains(backups.url))#expect(!plan.scan.leftovers.contains { $0.url.lastPathComponent == ".org.example.app.plist" })}diff --git a/Peel/Views/Presentation.swift b/Peel/Views/Presentation.swiftindex bb8ce4db..b5080792 100644--- a/Peel/Views/Presentation.swift+++ b/Peel/Views/Presentation.swift@@ -244,6 +244,8 @@ extension HoldBack {"Not selected: this holds passwords or sign-in codes that may exist only on this Mac. Once the Trash is emptied, they’re gone for good unless you have a backup."case .holdsVPNConnections:"Not selected: this holds VPN connections, with their keys and certificates, that may exist only on this Mac. Once the Trash is emptied, they’re gone for good unless you have a backup."+ case .holdsWorkMadeWithTheApp:+ "Not selected: this holds what you made with the app, such as saved games, databases, or the app’s own backups, which may exist only on this Mac. Once the Trash is emptied, it’s gone for good unless you have another copy."case .holdsKeys:"Left alone: a wallet or a key Peel protects is inside, so Peel leaves this folder where it is."case .holdsWorkKeptInACache:diff --git a/SAFETY.md b/SAFETY.mdindex 65181f1e..314195ec 100644--- a/SAFETY.md+++ b/SAFETY.md@@ -271,7 +271,8 @@ Never selected for you, even when found:- A folder with a repository, a wallet, a signing key, or a password database (KeePass's `.kdbx`, KeePassXC's `.keyx`)inside.- What an app keeps that may exist only on this Mac: local mail, message history, a password manager's backups and an- authenticator's codes, and VPN connections, each where the app's own documentation or source says it keeps them.+ authenticator's codes, VPN connections, a game's saves and a database, each where the app's own documentation or+ source says it keeps them, and anything named as an app's backups.- A copy Mail keeps of an attachment you opened, which you may have changed.- A file in iCloud Drive, which the Trash would take from every device, and a file a program has open right now.- An installer package an app keeps in Application Support, which the app may still need, and an update whose app is