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.

Downloads a tool keeps for you to install again are listed and never selected

Țugui Dragoș02d5ac6715c0
diff --git a/Localization/Peel/Localizable.xcstrings b/Localization/Peel/Localizable.xcstrings
index 2144d061..05474698 100644
--- a/Localization/Peel/Localizable.xcstrings
+++ b/Localization/Peel/Localizable.xcstrings
@@ -11473,108 +11473,108 @@
}
}
},
- "Archives, model weights, installed environments, and anything Peel couldn’t measure are listed but never selected for you." : {
+ "Archives, model weights, installed environments, downloads kept to install again, and anything Peel couldn’t measure are listed but never selected for you." : {
"localizations" : {
"cs" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Archivy, váhy modelů, nainstalovaná prostředí a vše, co Peel nedokázal změřit, jsou v seznamu, ale Peel je za vás nikdy nevybere."
+ "value" : "Archivy, váhy modelů, nainstalovaná prostředí, stažené soubory uchované pro opětovnou instalaci a vše, co Peel nedokázal změřit, jsou v seznamu, ale Peel je za vás nikdy nevybere."
}
},
"de" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Archive, Modellgewichte, installierte Umgebungen und alles, was Peel nicht messen konnte, werden angezeigt, aber nie für dich ausgewählt."
+ "value" : "Archive, Modellgewichte, installierte Umgebungen, aufbewahrte Downloads zum erneuten Installieren und alles, was Peel nicht messen konnte, werden angezeigt, aber nie für dich ausgewählt."
}
},
"es" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Las copias archivadas, los pesos de modelos, los entornos instalados y todo lo que Peel no ha podido medir se muestran, pero nunca se seleccionan por ti."
+ "value" : "Las copias archivadas, los pesos de modelos, los entornos instalados, las descargas que se conservan para volver a instalarlas y todo lo que Peel no ha podido medir se muestran, pero nunca se seleccionan por ti."
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Les archives, les poids de modèles, les environnements installés et tout ce que Peel n’a pas pu mesurer sont listés, mais jamais sélectionnés à votre place."
+ "value" : "Les archives, les poids de modèles, les environnements installés, les téléchargements conservés pour être réinstallés et tout ce que Peel n’a pas pu mesurer sont listés, mais jamais sélectionnés à votre place."
}
},
"it" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Archivi, pesi dei modelli, ambienti installati e tutto ciò che Peel non è riuscito a misurare sono elencati, ma non vengono mai selezionati al posto tuo."
+ "value" : "Archivi, pesi dei modelli, ambienti installati, download conservati per reinstallarli e tutto ciò che Peel non è riuscito a misurare sono elencati, ma non vengono mai selezionati al posto tuo."
}
},
"ja" : {
"stringUnit" : {
"state" : "translated",
- "value" : "アーカイブ、モデルの重み、インストール済みの環境、Peelが計測できなかったものは、一覧には表示されますが、自動で選択されることはありません。"
+ "value" : "アーカイブ、モデルの重み、インストール済みの環境、再インストール用に保管されているダウンロード、Peelが計測できなかったものは、一覧には表示されますが、自動で選択されることはありません。"
}
},
"ko" : {
"stringUnit" : {
"state" : "translated",
- "value" : "아카이브, 모델 가중치, 설치된 환경 및 Peel이 측정할 수 없었던 모든 항목은 목록에 표시되지만 절대 미리 선택되지 않습니다."
+ "value" : "아카이브, 모델 가중치, 설치된 환경, 다시 설치할 수 있도록 보관된 다운로드 파일 및 Peel이 측정할 수 없었던 모든 항목은 목록에 표시되지만 절대 미리 선택되지 않습니다."
}
},
"nl" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Archieven, modelgewichten, geïnstalleerde omgevingen en alles wat Peel niet kon meten, worden getoond maar nooit voor je geselecteerd."
+ "value" : "Archieven, modelgewichten, geïnstalleerde omgevingen, bewaarde downloads om opnieuw te installeren en alles wat Peel niet kon meten, worden getoond maar nooit voor je geselecteerd."
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Archiwa, wagi modeli, zainstalowane środowiska i wszystko, czego Peel nie mógł zmierzyć, są na liście, ale nigdy nie są zaznaczane za Ciebie."
+ "value" : "Archiwa, wagi modeli, zainstalowane środowiska, pobrane pliki zachowane do ponownej instalacji i wszystko, czego Peel nie mógł zmierzyć, są na liście, ale nigdy nie są zaznaczane za Ciebie."
}
},
"pt" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Arquivos comprimidos, pesos de modelos, ambientes instalados e tudo o que o Peel não conseguiu medir aparecem na lista, mas o Peel nunca os seleciona por você."
+ "value" : "Arquivos comprimidos, pesos de modelos, ambientes instalados, downloads guardados para instalar de novo e tudo o que o Peel não conseguiu medir aparecem na lista, mas o Peel nunca os seleciona por você."
}
},
"ro" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Arhivele, ponderile modelelor, mediile instalate și tot ce Peel nu a putut măsura sunt listate, dar nu sunt niciodată selectate pentru dvs."
+ "value" : "Arhivele, ponderile modelelor, mediile instalate, descărcările păstrate pentru a fi instalate din nou și tot ce Peel nu a putut măsura sunt listate, dar nu sunt niciodată selectate pentru dvs."
}
},
"ru" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Архивы, веса моделей, установленные окружения и все, что Peel не смог измерить, показываются в списке, но никогда не выбираются за Вас."
+ "value" : "Архивы, веса моделей, установленные окружения, загрузки, которые хранятся для повторной установки, и все, что Peel не смог измерить, показываются в списке, но никогда не выбираются за Вас."
}
},
"sv" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Arkiv, modellvikter, installerade miljöer och allt som Peel inte kunde mäta listas men markeras aldrig åt dig."
+ "value" : "Arkiv, modellvikter, installerade miljöer, hämtningar som sparas för att installeras igen och allt som Peel inte kunde mäta listas men markeras aldrig åt dig."
}
},
"tr" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Arşivler, model ağırlıkları, yüklü ortamlar ve Peel’in ölçemediği her şey listelenir ama hiçbir zaman sizin yerinize seçilmez."
+ "value" : "Arşivler, model ağırlıkları, yüklü ortamlar, yeniden yüklemek için saklanan indirmeler ve Peel’in ölçemediği her şey listelenir ama hiçbir zaman sizin yerinize seçilmez."
}
},
"uk" : {
"stringUnit" : {
"state" : "translated",
- "value" : "Архіви, ваги моделей, інстальовані середовища й усе, що Peel не змогла виміряти, є в списку, але Peel ніколи не вибирає їх за вас."
+ "value" : "Архіви, ваги моделей, інстальовані середовища, викачані файли, збережені для повторного інсталювання, і все, що Peel не змогла виміряти, є в списку, але Peel ніколи не вибирає їх за вас."
}
},
"zh-Hans" : {
"stringUnit" : {
"state" : "translated",
- "value" : "归档、模型权重、已安装的环境,以及Peel无法测量的任何内容都会列出,但绝不会替你选择。"
+ "value" : "归档、模型权重、已安装的环境、为重新安装而保留的下载文件,以及Peel无法测量的任何内容都会列出,但绝不会替你选择。"
}
},
"zh-Hant" : {
"stringUnit" : {
"state" : "translated",
- "value" : "封存檔、模型權重、已安裝的環境,以及Peel無法測量的任何項目都會列出,但絕不會替你選取。"
+ "value" : "封存檔、模型權重、已安裝的環境、保留供重新安裝的下載檔案,以及Peel無法測量的任何項目都會列出,但絕不會替你選取。"
}
}
}
@@ -24560,6 +24560,112 @@
}
}
},
+ "Downloads kept so you can install them again" : {
+ "localizations" : {
+ "cs" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Stažené soubory uchované, abyste je mohli znovu nainstalovat"
+ }
+ },
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Downloads, die aufbewahrt werden, damit du sie erneut installieren kannst"
+ }
+ },
+ "es" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Descargas que se conservan para que puedas volver a instalarlas"
+ }
+ },
+ "fr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Téléchargements conservés pour que vous puissiez les réinstaller"
+ }
+ },
+ "it" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Download conservati, così puoi reinstallarli"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "再インストールできるように保管されているダウンロード"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "다운로드 파일, 다시 설치할 수 있도록 보관됨"
+ }
+ },
+ "nl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Downloads, bewaard zodat je ze opnieuw kunt installeren"
+ }
+ },
+ "pl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Pobrane pliki zachowane do ponownej instalacji"
+ }
+ },
+ "pt" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Downloads guardados para que você possa instalá-los de novo"
+ }
+ },
+ "ro" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Descărcări păstrate ca să le puteți instala din nou"
+ }
+ },
+ "ru" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Загрузки, которые хранятся, чтобы Вы могли установить их снова"
+ }
+ },
+ "sv" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Hämtningar som sparas så att du kan installera dem igen"
+ }
+ },
+ "tr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Yeniden yükleyebilmeniz için saklanan indirmeler"
+ }
+ },
+ "uk" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Викачані файли, які зберігаються, щоб ви могли інсталювати їх знову"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "下载文件,保留下来以便你重新安装"
+ }
+ },
+ "zh-Hant" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "下載檔案,保留供你重新安裝"
+ }
+ }
+ }
+ },
"Drag a window from anywhere in it" : {
"localizations" : {
"cs" : {
diff --git a/Packages/PeelCore/Sources/PeelCommandLine/Support/Output.swift b/Packages/PeelCore/Sources/PeelCommandLine/Support/Output.swift
index 173a57fe..34bf6094 100644
--- a/Packages/PeelCore/Sources/PeelCommandLine/Support/Output.swift
+++ b/Packages/PeelCore/Sources/PeelCommandLine/Support/Output.swift
@@ -319,6 +319,7 @@ extension DeveloperEnvironment.ContentKind {
case .archives: "archives, kept by default"
case .models: "models, kept by default"
case .environments: "installed packages, kept by default"
+ case .keptDownloads: "downloads to install again, kept by default"
}
}
}
diff --git a/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift b/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift
index 25bdc6b3..e6a84d24 100644
--- a/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift
@@ -14,6 +14,8 @@ public struct DeveloperEnvironment: Sendable, Hashable, Identifiable {
case models
/// Installed sets of packages: virtual environments, editor plug-ins, language servers.
case environments
+ /// What a tool keeps for the person to install again: installers, store packages, virtual machine boxes.
+ case keptDownloads
}
public struct Location: Sendable, Hashable, Identifiable {
@@ -33,7 +35,7 @@ public struct DeveloperEnvironment: Sendable, Hashable, Identifiable {
public var isRecommended: Bool {
switch kind {
case .buildData, .downloads, .cache, .deviceSupport, .logs: size != nil
- case .archives, .models, .environments: false
+ case .archives, .models, .environments, .keptDownloads: false
}
}
}
@@ -120,6 +122,7 @@ public enum DeveloperCaches {
Folder("Library/Developer/Xcode/macOS DeviceSupport", .deviceSupport, source: "Xcode 27: CoreSymbolicationDT.framework/Resources/JSONCrashLog/DeviceSupportDirectories.py"),
Folder("Library/Developer/CoreSimulator/Caches", .cache, source: "https://developer.apple.com/documentation/xcode-release-notes/xcode-12_3-release-notes"),
Folder("Library/Caches/com.apple.dt.Xcode", .cache, source: "https://developer.apple.com/documentation/foundation/filemanager/searchpathdirectory/cachesdirectory"),
+ Folder("Library/Developer/Packages", .keptDownloads, source: "https://developer.apple.com/documentation/xcode-release-notes/xcode-16_2-release-notes"),
Folder("Library/Developer/Xcode/Archives", .archives, source: "Xcode 27: IDEFoundation.framework, -[IDEDeveloperPaths defaultDistributionArchivesLocation]"),
]),
Definition(id: "swiftpm", name: "Swift Package Manager", systemImage: "swift", appBundleIdentifiers: [], folders: [
@@ -549,6 +552,7 @@ public enum DeveloperCaches {
Folder(".minikube/cache/preloaded-tarball", .downloads, source: "https://github.com/kubernetes/minikube/blob/master/site/content/en/docs/handbook/offline.md#L10-L17"),
]),
Definition(id: "vagrant", name: "Vagrant", systemImage: "server.rack", appBundleIdentifiers: [], folders: [
+ Folder(".vagrant.d/boxes", .keptDownloads, source: "https://github.com/hashicorp/vagrant/blob/main/lib/vagrant/environment.rb#L140"),
Folder(".vagrant.d/tmp", .cache, source: "https://github.com/hashicorp/vagrant/blob/main/lib/vagrant/environment.rb#L143"),
]),
// Build systems and media
@@ -581,6 +585,7 @@ public enum DeveloperCaches {
// `Library/Caches/Unity/upm` from Unity 6 (docs.unity3d.com, Manual/upm-cache.html for each version).
Folder("Library/Caches/Unity/upm", .downloads, source: "https://docs.unity3d.com/Manual/upm-cache.html"),
Folder("Library/Unity/cache", .downloads, source: "https://docs.unity3d.com/2022.3/Documentation/Manual/upm-cache.html"),
+ Folder("Library/Unity/Asset Store-5.x", .keptDownloads, source: "https://docs.unity.com/asset-store/downloads/asset-store-packages"),
Folder("Library/Logs/Unity", .logs, source: "https://docs.unity3d.com/Manual/log-files.html"),
]),
Definition(id: "godot", name: "Godot", systemImage: "cube.transparent", appBundleIdentifiers: ["org.godotengine.godot"], folders: [
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift
index 0a0d8efc..96ad23f4 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/DeveloperCachesTests.swift
@@ -172,6 +172,8 @@ struct DeveloperCachesTests {
// minikube keeps its clusters' keys and the images a person added; Vagrant its machine index and key;
// Jan its chat history; Ollama a copy of its app while it updates.
".minikube", ".minikube/cache/images", ".vagrant.d", "Library/Application Support/Jan/data", "Library/Caches/ollama",
+ // Unity keeps its licenses beside its caches.
+ "Library/Unity",
]
// CocoaPods' spec repositories hold the ones a person added, which can carry unpushed work: only the CDN copy
// of the public index, `trunk`, is a cache. nvm's folder is nvm and every Node it installed; only its download
@@ -300,6 +302,21 @@ struct DeveloperCachesTests {
#expect(Set(locations.map(\.kind)) == [.models, .environments])
}
+ /// What a tool keeps for the person to install again: Xcode's hardware support installers, which Apple
+ /// suggests copying to other Macs, the Asset Store packages Unity downloaded, and Vagrant's boxes, some added
+ /// from a file that is gone.
+ @Test func downloadsKeptToInstallAgainAreListedButNeverSelected() async throws {
+ let directory = try TemporaryDirectory()
+ try directory.file("Library/Developer/Packages/HardwareSupport.pkg", bytes: 400_000)
+ try directory.file("Library/Unity/Asset Store-5.x/Publisher/Tools/Package.unitypackage", bytes: 400_000)
+ try directory.file(".vagrant.d/boxes/hashicorp-VAGRANTSLASH-bionic64/0/virtualbox/box-disk001.vmdk", bytes: 400_000)
+
+ let locations = await DeveloperCaches.scan(homeDirectory: directory.url).flatMap(\.locations)
+
+ #expect(locations.count == 3)
+ #expect(locations.allSatisfy { $0.kind == .keptDownloads && !$0.isRecommended })
+ }
+
/// Peel reads cask definitions from Homebrew's `api` folder, which `brew cleanup` leaves alone too. It is
/// never offered: without it, the next Homebrew question would go to the network.
@Test func leavesHomebrewsCopyOfTheCaskDefinitions() async throws {
diff --git a/Peel/Views/Developer/DeveloperDetailView.swift b/Peel/Views/Developer/DeveloperDetailView.swift
index 38ba76bb..5c09ae02 100644
--- a/Peel/Views/Developer/DeveloperDetailView.swift
+++ b/Peel/Views/Developer/DeveloperDetailView.swift
@@ -89,7 +89,7 @@ struct DeveloperDetailView: View {
NoteBadge(
title: Text("\(keptByDefault) kept"), systemImage: "hand.raised", tint: .secondary,
name: String(localized: "\(keptByDefault) kept"),
- detail: Text("Archives, model weights, installed environments, and anything Peel couldn’t measure are listed but never selected for you.")
+ detail: Text("Archives, model weights, installed environments, downloads kept to install again, and anything Peel couldn’t measure are listed but never selected for you.")
)
}
}
@@ -136,6 +136,7 @@ extension DeveloperEnvironment.ContentKind {
case .archives: "App archives, needed to read crash reports"
case .models: "Model weights or datasets, a long download to get back"
case .environments: "Installed packages, put back by installing them again"
+ case .keptDownloads: "Downloads kept so you can install them again"
}
}
@@ -149,6 +150,7 @@ extension DeveloperEnvironment.ContentKind {
case .archives: "archivebox.fill"
case .models: "brain"
case .environments: "shippingbox.and.arrow.backward"
+ case .keptDownloads: "tray.and.arrow.down"
}
}
}
diff --git a/README.md b/README.md
index f490966e..47172488 100644
--- a/README.md
+++ b/README.md
@@ -81,9 +81,10 @@ Peel is free and open source, and it speaks English and 17 other languages.
### Free up disk space
- **Orphaned Files:** files left behind by apps you already removed.
-- **Developer:** caches of Xcode, package managers, editors, cloud tools, and AI models. Model weights and virtual
- environments are listed but never selected for you, and toolchains or anything holding an account are never
- listed.
+- **Developer:** caches of Xcode, package managers, build systems, editors, cloud and virtual machine tools, game
+ engines, and AI models. Model weights, installed packages, and what a tool keeps for you to install again
+ (Vagrant boxes, Asset Store packages) are listed but never selected for you, and toolchains or anything holding
+ an account are never listed.
- **Build Artifacts:** what builds left in the folders you choose, like `node_modules`, `DerivedData`, and
`target`. A project changed in the last 7 days is never selected for you.
- **Duplicates:** files and whole folders with identical contents, compared with SHA-256. One copy is always kept.
diff --git a/SAFETY.md b/SAFETY.md
index 005164f4..8eb16844 100644
--- a/SAFETY.md
+++ b/SAFETY.md
@@ -139,12 +139,13 @@ move, or one that needs the helper while it cannot act.
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 by Remove Peel, in Settings, which takes its helper and login item away first.
-Never selected for you, even when found: model weights, virtual environments, `/Users/Shared` (it belongs to
-every account, not just yours), a project you worked on this week, a folder with a repository, a wallet, or a
-signing key inside, a folder macOS would not let Peel read, and a folder Peel could not measure in time. Those
-last two are shown with their size as "Unknown", never as zero, in every tool and in History once they are
-moved: a folder too big to read quickly may be exactly the one with work inside, and nothing is selected for you
-without saying how much it is. A total that leaves such a folder out reads "Over" what is known.
+Never selected for you, even when found: model weights, installed packages and virtual environments, the installers
+and boxes a tool keeps for you to install again, `/Users/Shared` (it belongs to every account, not just yours), a
+project you worked on this week, a folder with a repository, a wallet, or a signing key inside, a folder macOS would
+not let Peel read, and a folder Peel could not measure in time. Those last two are shown with their size as
+"Unknown", never as zero, in every tool and in History once they are moved: a folder too big to read quickly may be
+exactly the one with work inside, and nothing is selected for you without saying how much it is. A total that leaves
+such a folder out reads "Over" what is known.
Orphaned Files selects nothing for you, and its Select All and `peel orphans --remove` leave these folders out as
well: one with a repository, a wallet, or a signing key inside, or one Peel could not read or measure in time,