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
Keep a torrent client's list of torrents unselected
Țugui Dragoș3aef479b61d9
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 7050a305..a1bbe960 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -81,6 +81,8 @@ its changes the way [Keep a Changelog](https://keepachangelog.com/) suggests.also when you uninstall 1Password 8, which uses it too.- A folder holding a 1Password vault kept outside an account, `.opvault` or `.agilekeychain`, is listed and neverselected, like one holding a KeePass database, and the pages that measure folders hold it back too.+- A torrent client's list of torrents and how far each one got, as Transmission, qBittorrent, BiglyBT, Deluge, Motrix,+ and WebTorrent keep them, is listed and never selected: without it the app forgets every transfer.#### Spacediff --git a/Localization/Peel/Localizable.xcstrings b/Localization/Peel/Localizable.xcstringsindex e39bd457..9cb27d6d 100644--- a/Localization/Peel/Localizable.xcstrings+++ b/Localization/Peel/Localizable.xcstrings@@ -94499,6 +94499,112 @@}}},+ "Not selected: this holds your list of torrents and how far each one got, which may exist only on this Mac. Once the Trash is emptied, you’d have to add each torrent again." : {+ "localizations" : {+ "cs" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Nevybráno: obsahuje váš seznam torrentů i s průběhem jejich stahování, který může existovat jen v tomto Macu. Jakmile se koš vysype, budete muset každý torrent přidat znovu."+ }+ },+ "de" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Nicht ausgewählt: Dieses Objekt enthält deine Torrent-Liste und den Fortschritt jedes Torrents, die es möglicherweise nur auf diesem Mac gibt. Sobald der Papierkorb entleert ist, müsstest du jeden Torrent erneut hinzufügen."+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Sin seleccionar: contiene tu lista de torrents y el progreso de cada uno, algo que puede que solo exista en este Mac. En cuanto se vacíe la papelera, tendrías que volver a añadir cada torrent."+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Non sélectionné : il contient votre liste de torrents et la progression de chacun, qui n’existent peut-être que sur ce Mac. Une fois la corbeille vidée, il vous faudrait ajouter à nouveau chaque torrent."+ }+ },+ "it" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Non selezionato: contiene l’elenco dei tuoi torrent e l’avanzamento di ciascuno, che potrebbero esistere solo su questo Mac. Una volta svuotato il Cestino, dovrai aggiungere di nuovo ogni torrent."+ }+ },+ "ja" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "未選択: ここには、追加したトレントのリストと、それぞれの進行状況が含まれており、このMacにしか存在しない可能性があります。ゴミ箱を空にすると、トレントを1つずつ追加し直す必要があります。"+ }+ },+ "ko" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "선택되지 않음: 이 Mac에만 있을 수 있는 토렌트 목록과 각 토렌트의 진행 상태가 들어 있습니다. 휴지통을 비우면 각 토렌트를 다시 추가해야 합니다."+ }+ },+ "nl" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Niet geselecteerd: dit bevat je lijst met torrents en de voortgang van elke torrent, die misschien alleen op deze Mac staan. Zodra de prullenmand is geleegd, moet je elke torrent opnieuw toevoegen."+ }+ },+ "pl" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Nie zaznaczono: zawiera Twoją listę torrentów, która może istnieć tylko na tym Macu, wraz z postępem pobierania każdego z nich. Po opróżnieniu Kosza trzeba będzie ponownie dodać każdy torrent."+ }+ },+ "pt" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Não selecionado: este item contém a sua lista de torrents e o progresso de cada um, que podem existir só neste Mac. Depois que o Lixo for esvaziado, você precisaria adicionar cada torrent de novo."+ }+ },+ "ro" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Neselectat: acest articol conține lista dvs. de torrente și progresul fiecăruia, care pot exista doar pe acest Mac. După golirea Coșului, ar trebui să adăugați din nou fiecare torrent."+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Не выбрано: здесь хранятся Ваш список торрентов и прогресс загрузки каждого из них, и, возможно, они есть только на этом Mac. После очистки Корзины Вам нужно будет снова добавить каждый торрент."+ }+ },+ "sv" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Inte markerad: den innehåller din lista över torrenter och hur långt var och en har kommit, uppgifter som kanske bara finns på den här datorn. När papperskorgen har tömts behöver du lägga till varje torrent igen."+ }+ },+ "tr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Seçilmedi: bu, yalnızca bu Mac’te bulunabilecek torrent listenizi ve her birinin ne kadar ilerlediğini içerir. Çöp Sepeti boşaltıldığında her torrenti yeniden eklemeniz gerekir."+ }+ },+ "uk" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Не вибрано: тут зберігається ваш список торентів, який може існувати лише на цьому Mac, разом із перебігом викачування кожного з них. Коли Смітник буде очищено, вам доведеться знову додати кожен торент."+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "未选择:此处存有你的种子列表以及每个种子的下载进度,这些内容可能仅存在于这台Mac上。一旦清倒废纸篓,你就需要重新添加每个种子。"+ }+ },+ "zh-Hant" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "未選取:其中存有你的torrent列表及每個torrent的下載進度,這些內容可能只存在於這部Mac上。一旦清空「垃圾桶」,你就需要重新加入每個torrent。"+ }+ }+ }+ },"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 60f0caf1..60371df7 100644--- a/Packages/PeelCore/Sources/PeelCommandLine/Support/Output.swift+++ b/Packages/PeelCore/Sources/PeelCommandLine/Support/Output.swift@@ -335,6 +335,7 @@ extension HoldBack {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 .holdsSignIns: "holds a sign-in to a service, such as a token a tool saved when you logged in"+ case .holdsTorrents: "holds your list of torrents and how far each one got, which 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 .holdsSimulators: "holds the app's simulators, with the apps installed in them and their data"diff --git a/Packages/PeelCore/Sources/PeelCore/Leftovers/KeptOnlyHere.swift b/Packages/PeelCore/Sources/PeelCore/Leftovers/KeptOnlyHere.swiftindex ee150bae..afe107d2 100644--- a/Packages/PeelCore/Sources/PeelCore/Leftovers/KeptOnlyHere.swift+++ b/Packages/PeelCore/Sources/PeelCore/Leftovers/KeptOnlyHere.swift@@ -52,6 +52,21 @@ enum KeptOnlyHere {// OBS Studio keeps its profiles and scene collections in `obs-studio/basic` in its configuration folder// (`frontend/OBSApp.cpp`), and nowhere else.("Library/Application Support/obs-studio", "basic", .holdsWorkMadeWithTheApp),+ // Torrent clients keep each torrent added and how far it got apart from what it downloaded, and forget every+ // transfer without them. Transmission's "Configuration Files": `torrents`, `resume` and the Mac app's+ // `Transfers.plist`, in this folder.+ ("Library/Application Support/Transmission", nil, .holdsTorrents),+ // qBittorrent's `SessionImpl`: `BT_backup`, or `torrents.db`, in its data folder.+ ("Library/Application Support/qBittorrent", "BT_backup", .holdsTorrents),+ ("Library/Application Support/qBittorrent", "torrents.db", .holdsTorrents),+ // BiglyBT's `DownloadManagerStateImpl`: `active` in its user folder.+ ("Library/Application Support/BiglyBT", "active", .holdsTorrents),+ // Deluge's `TorrentManager`: `state` in its configuration folder, which is XDG's on a Mac.+ (".config/deluge", "state", .holdsTorrents),+ // Motrix's `getSessionPath`: aria2's session, read again at every start.+ ("Library/Application Support/Motrix", "download.session", .holdsTorrents),+ // WebTorrent's `TORRENT_PATH`.+ ("Library/Application Support/WebTorrent", "Torrents", .holdsTorrents),// Docker's `docker login`: with no credential store, the credentials go in `.docker/config.json`.(".docker", "config.json", .holdsSignIns),// Cargo's `cargo login`: the token is saved in `$CARGO_HOME/credentials.toml`, and `CARGO_HOME` is `.cargo`.diff --git a/Packages/PeelCore/Sources/PeelCore/Leftovers/Leftover.swift b/Packages/PeelCore/Sources/PeelCore/Leftovers/Leftover.swiftindex efd13e3a..0cb71899 100644--- a/Packages/PeelCore/Sources/PeelCore/Leftovers/Leftover.swift+++ b/Packages/PeelCore/Sources/PeelCore/Leftovers/Leftover.swift@@ -86,6 +86,8 @@ public enum HoldBack: String, Sendable, Hashable {case holdsVPNConnections/// A sign-in to a service a tool saved when the person logged in, such as a registry token (`KeptOnlyHere`).case holdsSignIns+ /// A torrent client's list of the torrents added to it and how far each one got (`KeptOnlyHere`).+ case holdsTorrents/// 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 holdsWorkMadeWithTheAppdiff --git a/Packages/PeelCore/Tests/PeelCoreTests/KeptOnlyHereTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/KeptOnlyHereTests.swiftindex 1bb99f17..1f73deba 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/KeptOnlyHereTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/KeptOnlyHereTests.swift@@ -29,6 +29,15 @@ struct KeptOnlyHereTests {("Library/Application Support/Example/Backups", .holdsWorkMadeWithTheApp),("Library/Application Support/obs-studio", .holdsWorkMadeWithTheApp),("Library/Application Support/obs-studio/basic/scenes/Untitled.json", .holdsWorkMadeWithTheApp),+ ("Library/Application Support/Transmission", .holdsTorrents),+ ("Library/Application Support/Transmission/Transfers.plist", .holdsTorrents),+ ("Library/Application Support/qBittorrent", .holdsTorrents),+ ("Library/Application Support/qBittorrent/BT_backup/1a2b.fastresume", .holdsTorrents),+ ("Library/Application Support/qBittorrent/torrents.db", .holdsTorrents),+ ("Library/Application Support/BiglyBT/active/1a2b.dat", .holdsTorrents),+ (".config/deluge", .holdsTorrents), (".config/deluge/state/torrents.fastresume", .holdsTorrents),+ ("Library/Application Support/Motrix/download.session", .holdsTorrents),+ ("Library/Application Support/WebTorrent/Torrents/1a2b.torrent", .holdsTorrents),(".docker", .holdsSignIns), (".docker/config.json", .holdsSignIns),(".cargo/credentials.toml", .holdsSignIns), (".pypirc", .holdsSignIns),(".gem/credentials", .holdsSignIns), (".local/share/gem/credentials", .holdsSignIns),@@ -60,6 +69,8 @@ struct KeptOnlyHereTests {"Library/Application Support/Steam Link", "Library/Caches/Postgres", "Library/Application Support/Backupify","Library/Application Support/obs-studio/logs",".docker/contexts", ".cargo/registry", ".config", ".local/share", ".terraform.d/plugins",+ "Library/Application Support/qBittorrent/logs", "Library/Caches/qBittorrent", ".config/deluge/plugins",+ "Library/Application Support/Motrix/dht.dat", "Library/Application Support/WebTorrent/Posters",]for path in free {#expect(KeptOnlyHere.reason(for: "\(home)/\(path)", home: home, root: "/") == nil, "\(path)")diff --git a/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swiftindex 71cbfa09..af7d0aaa 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swift@@ -1984,6 +1984,25 @@ struct LeftoverScannerTests {#expect(manifests["com.example.bridge.json"]?.match.isRecommended == true)}+ @Test func aTorrentClientsListOfTorrentsIsNotSelected() async throws {+ let directory = try TemporaryDirectory()+ try directory.file("home/Library/Application Support/Transmission/resume/Example.1a2b3c4d.resume")+ try directory.file("home/.config/deluge/state/torrents.state")+ let transmission = InstalledApp(+ url: URL(filePath: "/Applications/Transmission.app"), bundleIdentifier: "org.example.transmission",+ name: "Transmission"+ )+ let deluge = InstalledApp(+ url: URL(filePath: "/Applications/Deluge.app"), bundleIdentifier: "org.example.deluge", name: "Deluge"+ )+ let scanner = LeftoverScanner(environment: environment(in: directory))++ for app in [transmission, deluge] {+ let leftovers = await scanner.scan(app, installedApps: [transmission, deluge]).leftovers+ #expect(leftovers.map(\.match.heldBack) == [.holdsTorrents], "\(app.name)")+ }+ }+@Test func aFolderHoldingAStandaloneVaultIsNeverSelected() async throws {let directory = try TemporaryDirectory()try directory.file("home/Library/Application Support/Tunewell/Vault.opvault/default/profile.js")diff --git a/Peel/Views/Presentation.swift b/Peel/Views/Presentation.swiftindex a49b08e0..0cf7963f 100644--- a/Peel/Views/Presentation.swift+++ b/Peel/Views/Presentation.swift@@ -311,6 +311,8 @@ extension HoldBack {"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 .holdsSignIns:"Not selected: this holds a sign-in to a service, such as a token a tool saved when you logged in. Once the Trash is emptied, you’d sign in again."+ case .holdsTorrents:+ "Not selected: this holds your list of torrents and how far each one got, which may exist only on this Mac. Once the Trash is emptied, you’d have to add each torrent again."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 .holdsSimulators: