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.

Space empties the logs and crash reports every account shares in /Library/Logs

Țugui Dragoș7b7f10fc8b87
diff --git a/Localization/Peel/Localizable.xcstrings b/Localization/Peel/Localizable.xcstrings
index 7bd4d847..95f0f0ff 100644
--- a/Localization/Peel/Localizable.xcstrings
+++ b/Localization/Peel/Localizable.xcstrings
@@ -54900,6 +54900,112 @@
},
"shouldTranslate" : false
},
+ "Logs for All Users" : {
+ "localizations" : {
+ "cs" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Protokoly pro všechny uživatele"
+ }
+ },
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Protokolle für alle Benutzer:innen"
+ }
+ },
+ "es" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Registros para todos los usuarios"
+ }
+ },
+ "fr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Historiques pour tous les utilisateurs"
+ }
+ },
+ "it" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Log per tutti gli utenti"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "すべてのユーザのログ"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "모든 사용자의 로그"
+ }
+ },
+ "nl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Logs voor alle gebruikers"
+ }
+ },
+ "pl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Dzienniki dla wszystkich użytkowników"
+ }
+ },
+ "pt" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Registros para Todos os Usuários"
+ }
+ },
+ "ro" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Jurnale pentru toți utilizatorii"
+ }
+ },
+ "ru" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Журналы для всех пользователей"
+ }
+ },
+ "sv" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Loggar för alla användare"
+ }
+ },
+ "tr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Tüm Kullanıcılar İçin Günlükler"
+ }
+ },
+ "uk" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Журнали для всіх користувачів"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "所有用户的日志"
+ }
+ },
+ "zh-Hant" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "所有使用者的記錄檔"
+ }
+ }
+ }
+ },
"Logs of what the tool did, which nothing makes again" : {
"localizations" : {
"cs" : {
@@ -55006,6 +55112,112 @@
}
}
},
+ "Logs that apps wrote for every account on this Mac, and the crash reports macOS keeps, in the Library at the top of the disk. What macOS writes there for its own services isn’t listed, and what an open app uses stays. What an administrator owns goes through Peel’s helper." : {
+ "localizations" : {
+ "cs" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Protokoly, které aplikace zapsaly pro všechny účty v tomto Macu, a zprávy o haváriích, které uchovává systém macOS, v Knihovně na nejvyšší úrovni disku. Co tam systém macOS zapisuje pro vlastní služby, se nezobrazuje, a co používá otevřená aplikace, zůstává na místě. Co patří správci, se přesouvá přes pomocníka Peelu."
+ }
+ },
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Protokolle, die Apps für jeden Benutzeraccount auf diesem Mac geschrieben haben, und die Absturzberichte, die macOS aufbewahrt, in der Library auf der obersten Ebene des Volumes. Was macOS dort für seine eigenen Dienste schreibt, wird nicht angezeigt, und was eine geöffnete App verwendet, bleibt erhalten. Was einem Administrator gehört, wird über das Hilfsprogramm von Peel verschoben."
+ }
+ },
+ "es" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Registros que las apps han escrito para todas las cuentas de este Mac, y los informes de errores que guarda macOS, en la carpeta Biblioteca de la raíz del disco. Lo que macOS escribe ahí para sus propios servicios no se muestra, y lo que usa una app abierta se queda donde está. Lo que pertenece a un administrador se traslada mediante el asistente de Peel."
+ }
+ },
+ "fr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Les historiques que les apps ont écrits pour tous les comptes de ce Mac, et les rapports de blocage que macOS conserve, dans le dossier Bibliothèque à la racine du disque. Ce que macOS y écrit pour ses propres services n’est pas listé, et ce qu’une app ouverte utilise reste en place. Ce qui appartient à un administrateur passe par l’utilitaire de Peel."
+ }
+ },
+ "it" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Log che le app hanno scritto per tutti gli account di questo Mac, e i resoconti dei blocchi che macOS conserva, nella cartella Libreria al livello principale del disco. Ciò che macOS scrive lì per i propri servizi non è elencato, e ciò che usa un’app aperta resta al suo posto. Ciò che appartiene a un amministratore viene spostato tramite l’assistente di Peel."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "アプリがこのMacのすべてのアカウントのために書き込んだログと、macOSが保管しているクラッシュレポートで、ディスクの最上位にある“ライブラリ”フォルダにあります。macOSが自身のサービスのためにそこに書き込んでいるものは一覧に表示されず、開いているアプリが使用しているものはそのまま残ります。管理者が所有するものは、Peelのヘルパーを通じてゴミ箱に入れます。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "앱이 디스크 최상위에 있는 라이브러리에 이 Mac의 모든 계정을 위해 기록한 로그와 macOS가 보관하는 충돌 리포트입니다. macOS가 자체 서비스를 위해 그곳에 기록하는 항목은 목록에 표시되지 않으며, 열려 있는 앱이 사용하는 항목은 그대로 유지됩니다. 관리자가 소유한 항목은 Peel 보조 프로그램을 통해 이동합니다."
+ }
+ },
+ "nl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Logs die apps voor elke account op deze Mac hebben geschreven, en de crashrapporten die macOS bewaart, in de map 'Bibliotheek' bovenaan de schijf. Wat macOS daar voor zijn eigen diensten schrijft, wordt niet getoond, en wat een geopende app gebruikt, blijft staan. Wat van een beheerder is, gaat via het hulpprogramma van Peel."
+ }
+ },
+ "pl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Dzienniki zapisane przez aplikacje dla wszystkich kont na tym Macu oraz raporty o awariach przechowywane przez macOS, w folderze Biblioteki na najwyższym poziomie dysku. Tego, co macOS zapisuje tam na potrzeby własnych usług, nie ma na liście, a to, czego używa otwarta aplikacja, zostaje na miejscu. To, co należy do administratora, przenosi pomocnik Peel."
+ }
+ },
+ "pt" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Registros que os apps gravaram para todas as contas deste Mac, e os relatórios de falha que o macOS mantém, na Biblioteca que fica no nível superior do disco. O que o macOS grava ali para os próprios serviços não é listado, e o que um app aberto usa permanece. O que pertence a um administrador passa pelo auxiliar do Peel."
+ }
+ },
+ "ro" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Jurnale scrise de aplicații pentru toate conturile de pe acest Mac și rapoartele de oprire subită pe care le păstrează macOS, în dosarul Bibliotecă de la rădăcina discului. Ce scrie macOS acolo pentru propriile servicii nu este listat, iar ce folosește o aplicație deschisă rămâne pe loc. Ce deține un administrator este mutat prin instrumentul de ajutor Peel."
+ }
+ },
+ "ru" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Журналы, которые приложения записали для всех учетных записей на этом Mac, и отчеты о сбоях, которые хранит macOS, в папке «Библиотека» в корне диска. То, что macOS записывает там для своих служб, не показывается, а то, что использует открытое приложение, остается на месте. То, чем владеет администратор, перемещается через помощника Peel."
+ }
+ },
+ "sv" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Loggar som appar har skrivit för alla konton på den här datorn, och de kraschrapporter som macOS sparar, i mappen Bibliotek på skivans översta nivå. Det som macOS skriver där för sina egna tjänster visas inte, och det som en öppen app använder stannar kvar. Det som en administratör äger går via Peels hjälpprogram."
+ }
+ },
+ "tr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Uygulamaların bu Mac’teki her hesap için, diskin en üstündeki Kitaplık klasörüne yazdığı günlükler ve macOS’in orada tuttuğu çökme raporları. macOS’in orada kendi hizmetleri için yazdıkları listelenmez ve açık bir uygulamanın kullandıkları yerinde kalır. Bir yöneticinin sahip oldukları Peel’in yardımcısı aracılığıyla taşınır."
+ }
+ },
+ "uk" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Журнали, які програми записали для всіх облікових записів на цьому Mac, і звіти про аварії, які зберігає macOS, у Бібліотеці на верхньому рівні диска. Те, що macOS записує там для власних служб, не показується, а те, чим користується відкрита програма, лишається. Те, що належить адміністратору, переміщується через помічника Peel."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "App在磁盘顶层的资源库中为这台Mac上的所有账户写入的日志,以及macOS在那里保留的崩溃报告。macOS为其自身服务在那里写入的内容不会列出,已打开的App正在使用的内容会保留。管理员拥有的内容会通过Peel的帮助程序移除。"
+ }
+ },
+ "zh-Hant" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "App為這部Mac上的所有帳號寫入的記錄檔,以及macOS保留的當機報告,位於磁碟最上層的「資源庫」中。macOS為其自身服務寫入那裡的內容不會列出,打開中的App正在使用的內容會保留。管理者擁有的項目會透過Peel的輔助程式移動。"
+ }
+ }
+ }
+ },
"Logs that apps wrote in your Library." : {
"localizations" : {
"cs" : {
diff --git a/Packages/PeelCore/Sources/PeelCore/Space/SpaceRemoval.swift b/Packages/PeelCore/Sources/PeelCore/Space/SpaceRemoval.swift
index 5897b865..2ec08204 100644
--- a/Packages/PeelCore/Sources/PeelCore/Space/SpaceRemoval.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Space/SpaceRemoval.swift
@@ -109,11 +109,14 @@ public enum SpaceRemoval {
var inUse: [(url: URL, name: String)] = []
var leftToDeveloper: [URL] = []
let systemCaches = SystemCaches(environment: environment)
+ let filesOnly = Set(item.onlyFilesIn.map(PathPattern.comparablePath))
func sort(_ folder: URL, leaving owned: [[String]], owner: String?) {
let children = try? FileManager.default.contentsOfDirectory(at: folder, includingPropertiesForKeys: nil)
+ let onlyFiles = filesOnly.contains(PathPattern.comparablePath(of: folder))
for child in children ?? [] {
let name = child.lastPathComponent
- if item.leavesMacOSsOwn, SystemCaches.isMacOSs(name) { continue }
+ if item.leavesMacOSsOwn, SpaceInventory.isMacOSsOwn(name) { continue }
+ if onlyFiles, child.isRealFolder { continue }
let app = owner ?? running[Naming.normalized(name)]
let listed = owned.filter { fnmatch($0[0], name, FNM_CASEFOLD) == 0 }
if app == nil, !listed.isEmpty, !listed.contains(where: { $0.count == 1 }), child.isRealFolder {
diff --git a/Packages/PeelCore/Sources/PeelCore/Space/SpaceReport.swift b/Packages/PeelCore/Sources/PeelCore/Space/SpaceReport.swift
index e43ae2ab..2d1be3a9 100644
--- a/Packages/PeelCore/Sources/PeelCore/Space/SpaceReport.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Space/SpaceReport.swift
@@ -31,6 +31,8 @@ public struct SpaceItem: Sendable, Hashable, Identifiable {
/// True when what macOS keeps in its folders for its own services is neither measured nor offered: they run as
/// other accounts, whose open files Peel cannot see.
public var leavesMacOSsOwn = false
+ /// The folders of `urls` where macOS files reports into folders of its own, so only their files are offered.
+ public var onlyFilesIn: [URL] = []
public var isReadOnly: Bool {
if case .readOnly = handling { true } else { false }
@@ -66,6 +68,7 @@ public enum SpaceInventory {
var groupContainerFolder: String?
var heldBack: HoldBack?
var leavesMacOSsOwn = false
+ var onlyFilesIn: [String] = []
/// Each of `paths` on this Mac: one that starts with `/` is under `root`, the rest are in `home`.
func urls(home: URL, root: URL) -> [URL] {
@@ -75,6 +78,10 @@ public enum SpaceInventory {
: home.appending(path: path, directoryHint: .isDirectory)
}
}
+
+ func onlyFilesIn(root: URL) -> [URL] {
+ onlyFilesIn.map { root.appending(path: String($0.dropFirst()), directoryHint: .isDirectory) }
+ }
}
/// The identifier of every area. Public so the app can check that it has words for each one: the words
@@ -250,6 +257,14 @@ public enum SpaceInventory {
handling: .trash,
leavesMacOSsOwn: true
),
+ Definition(
+ id: "system-logs",
+ category: .library,
+ paths: ["/Library/Logs", "/Library/Logs/DiagnosticReports"],
+ handling: .trash,
+ leavesMacOSsOwn: true,
+ onlyFilesIn: ["/Library/Logs/DiagnosticReports"]
+ ),
]
/// The total size of `urls`, or nil when any of them could not be measured. A folder a file provider owns
@@ -282,9 +297,23 @@ public enum SpaceInventory {
.filter { !ProtectedData.isApplesName($0.lastPathComponent) }
}
- private static func childrenNotMacOSs(of folder: URL) -> [URL] {
- let names = (try? FileManager.default.contentsOfDirectory(atPath: folder.path(percentEncoded: false))) ?? []
- return names.filter { !SystemCaches.isMacOSs($0) }.map { folder.appending(path: $0) }
+ /// What an area that leaves macOS's own out can offer in its `folders`: every child not named for macOS and not
+ /// one of the folders themselves, and only the files where macOS files its reports into folders.
+ private static func offered(in folders: [URL], of definition: Definition, root: URL) -> [URL] {
+ let paths = Set(folders.map(PathPattern.comparablePath))
+ let filesOnly = Set(definition.onlyFilesIn(root: root).map(PathPattern.comparablePath))
+ return folders.flatMap { folder in
+ let names = (try? FileManager.default.contentsOfDirectory(atPath: folder.path(percentEncoded: false))) ?? []
+ return names.filter { !isMacOSsOwn($0) }.map { folder.appending(path: $0) }.filter { child in
+ !paths.contains(PathPattern.comparablePath(of: child))
+ && !(filesOnly.contains(PathPattern.comparablePath(of: folder)) && child.isRealFolder)
+ }
+ }
+ }
+
+ /// Whether macOS keeps `name` for its own services in a folder every account shares.
+ static func isMacOSsOwn(_ name: String) -> Bool {
+ SystemCaches.isMacOSs(name) || SystemLogs.isMacOSs(name)
}
private static func folders(in parent: URL) -> [URL] {
@@ -330,7 +359,7 @@ public enum SpaceInventory {
var pending = wanted.makeIterator()
func addNext() -> Bool {
guard !Task.isCancelled, let (definition, urls) = pending.next() else { return false }
- let measured = definition.leavesMacOSsOwn ? urls.flatMap(childrenNotMacOSs) : urls
+ let measured = definition.leavesMacOSsOwn ? offered(in: urls, of: definition, root: root) : urls
group.addTask { (definition, urls, await size(of: measured, measure: measure)) }
return true
}
@@ -345,7 +374,8 @@ public enum SpaceInventory {
size: size,
handling: definition.handling,
heldBack: definition.heldBack,
- leavesMacOSsOwn: definition.leavesMacOSsOwn
+ leavesMacOSsOwn: definition.leavesMacOSsOwn,
+ onlyFilesIn: definition.onlyFilesIn(root: root)
))
}
}
diff --git a/Packages/PeelCore/Sources/PeelCore/Space/SystemLogs.swift b/Packages/PeelCore/Sources/PeelCore/Space/SystemLogs.swift
new file mode 100644
index 00000000..8b339bca
--- /dev/null
+++ b/Packages/PeelCore/Sources/PeelCore/Space/SystemLogs.swift
@@ -0,0 +1,20 @@
+import Foundation
+
+/// What macOS writes in the Logs folder at the top of the disk for its own services, each with the part of the
+/// sealed system that names that path.
+enum SystemLogs {
+ static let named: [String: String] = [
+ "CrashReporter": "/usr/libexec/DumpPanic",
+ "hidfw-crashlogs": "/usr/libexec/sysdiagnosed",
+ "LKDC-setup.log": "/usr/libexec/configureLocalKDC",
+ "MCXTools.log": "/usr/libexec/mcxalr",
+ "WindowServer": "/usr/libexec/sysdiagnosed",
+ "Xsan": "/System/Library/Filesystems/acfs.fs/Contents/Resources/acfs.util",
+ ]
+
+ private static let lowercasedNames = Set(named.keys.map { $0.lowercased() })
+
+ static func isMacOSs(_ name: String) -> Bool {
+ lowercasedNames.contains(name.lowercased())
+ }
+}
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/SpaceInventoryTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/SpaceInventoryTests.swift
index 7dd6134d..7b65d0de 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/SpaceInventoryTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/SpaceInventoryTests.swift
@@ -25,11 +25,16 @@ struct SpaceInventoryTests {
try directory.file("Library/Logs/big.log", bytes: 400_000)
try directory.file(".colima/machine/disk.img", bytes: 16)
- let report = await SpaceInventory.scan(home: directory.url, root: directory.url, minimumSize: 100_000, measure: FileSize.measure)
+ let root = directory.url.appending(path: "root", directoryHint: .isDirectory)
+ let report = await SpaceInventory.scan(
+ home: directory.url, root: root, minimumSize: 100_000, measure: FileSize.measure
+ )
#expect(report.items.map(\.id) == ["logs"])
#expect(report.items.first?.handling == .trash)
- let everything = await SpaceInventory.scan(home: directory.url, root: directory.url, minimumSize: 1, measure: FileSize.measure)
+ let everything = await SpaceInventory.scan(
+ home: directory.url, root: root, minimumSize: 1, measure: FileSize.measure
+ )
#expect(Set(everything.items.map(\.id)) == ["logs", "colima"])
}
@@ -194,6 +199,28 @@ struct SpaceInventoryTests {
#expect(caches.size.map { $0 >= 8_000 && $0 < 50_000 } == true)
}
+ /// The logs every account shares are measured without what macOS writes there for its own services, and the
+ /// crash reports without the folders macOS files them into.
+ @Test func findsTheLogsAndReportsEveryAccountSharesWithoutMacOSsOwn() async throws {
+ let directory = try TemporaryDirectory()
+ try directory.file("root/Library/Logs/org.example.tool/run.log", bytes: 8_000)
+ try directory.file("root/Library/Logs/WindowServer/session.log", bytes: 50_000)
+ try directory.file("root/Library/Logs/DiagnosticReports/Example_2026-09-28.ips", bytes: 4_000)
+ try directory.file("root/Library/Logs/DiagnosticReports/Retired/panic-full.ips", bytes: 50_000)
+
+ let report = await SpaceInventory.scan(
+ home: directory.url.appending(path: "home", directoryHint: .isDirectory),
+ root: directory.url.appending(path: "root", directoryHint: .isDirectory),
+ minimumSize: 1, measure: FileSize.measure
+ )
+
+ let logs = try #require(report.items.first { $0.id == "system-logs" })
+ #expect(logs.urls.map { $0.pathComponents.suffix(2).joined(separator: "/") } == [
+ "Library/Logs", "Logs/DiagnosticReports",
+ ])
+ #expect(logs.size.map { $0 >= 12_000 && $0 < 50_000 } == true)
+ }
+
@Test func everyDefinitionSaysWhatItIsAndWhoOwnsIt() {
for definition in SpaceInventory.definitions {
#expect(!definition.id.isEmpty)
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/SpaceRemovalTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/SpaceRemovalTests.swift
index 081efdff..16093440 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/SpaceRemovalTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/SpaceRemovalTests.swift
@@ -142,6 +142,31 @@ struct SpaceRemovalTests {
#expect(plan.needsTheHelper.isEmpty, "a folder the person owns moves without the helper")
}
+ @Test func offersTheLogsAndReportsEveryAccountSharesButMacOSsOwn() async throws {
+ let directory = try TemporaryDirectory()
+ for path in [
+ "org.example.tool/run.log", "WindowServer/session.log", "MCXTools.log",
+ "DiagnosticReports/Example_2026-09-28.ips", "DiagnosticReports/Retired/panic-full.ips",
+ ] {
+ try directory.file("root/Library/Logs/\(path)")
+ }
+ let logs = directory.url.appending(path: "root/Library/Logs", directoryHint: .isDirectory)
+ let reports = logs.appending(path: "DiagnosticReports", directoryHint: .isDirectory)
+ let shared = SpaceItem(
+ id: "system-logs",
+ category: .library,
+ urls: [logs, reports],
+ size: 0,
+ handling: .trash,
+ leavesMacOSsOwn: true,
+ onlyFilesIn: [reports]
+ )
+
+ let plan = await SpaceRemoval.plan(for: shared, environment: environment(directory), running: [:])
+
+ #expect(plan.removable.map(\.lastPathComponent).sorted() == ["Example_2026-09-28.ips", "org.example.tool"])
+ }
+
@Test(.permissionsHold) func whatOnlyAnAdministratorCanMoveGoesThroughTheHelper() async throws {
let directory = try TemporaryDirectory()
try directory.file("root/Library/Caches/org.example.updater/data.bin")
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/SystemCachesTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/SystemCachesTests.swift
index d774aef5..f3cfeea4 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/SystemCachesTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/SystemCachesTests.swift
@@ -10,6 +10,13 @@ struct SystemCachesTests {
}
}
+ @Test func everyLogIsNamedByThePartOfTheSealedSystemThatWritesIt() throws {
+ for (name, source) in SystemLogs.named {
+ let bytes = try Data(contentsOf: URL(filePath: source))
+ #expect(bytes.range(of: Data("/Library/Logs/\(name)".utf8)) != nil, "\(name): \(source)")
+ }
+ }
+
@Test func knowsApplesCachesByTheirNameOrTheSystemsOwn() {
#expect(SystemCaches.isMacOSs("com.apple.Spotlight"))
#expect(SystemCaches.isMacOSs("CloudKit"))
diff --git a/Peel/Views/Space/SpaceText.swift b/Peel/Views/Space/SpaceText.swift
index 87016189..76a2000b 100644
--- a/Peel/Views/Space/SpaceText.swift
+++ b/Peel/Views/Space/SpaceText.swift
@@ -149,6 +149,10 @@ extension SpaceItem {
title: "Caches for All Users",
detail: "What apps cached for every account on this Mac, in the Library at the top of the disk. What macOS keeps there for its own services isn’t listed, and what an open app uses stays. What an administrator owns goes through Peel’s helper."
),
+ "system-logs": Words(
+ title: "Logs for All Users",
+ detail: "Logs that apps wrote for every account on this Mac, and the crash reports macOS keeps, in the Library at the top of the disk. What macOS writes there for its own services isn’t listed, and what an open app uses stays. What an administrator owns goes through Peel’s helper."
+ ),
"battlenet-cache": Words(
title: "Battle.net Cache",
detail: "What the Battle.net app caches for every account on this Mac. Blizzard says removing it doesn’t affect your games, and the app makes it again. Since it belongs to every account, it is listed and never selected."
diff --git a/README.md b/README.md
index 6fa95757..8a125ccc 100644
--- a/README.md
+++ b/README.md
@@ -119,8 +119,9 @@ Peel is free and open source, and it speaks English and 17 other languages.
iPhone backups hold. Nothing is selected for you.
- **iCloud Drive:** files already safe in iCloud that are also downloaded to this Mac. Remove Downloads, as in
Finder, takes away only the copy on this Mac: each file stays in iCloud and downloads again when you open it.
-- **Space:** what's taking up room, and which app it belongs to. The caches apps keep for every account, in the
- Library at the top of the disk, go through Peel's helper, and what macOS keeps there is never listed.
+- **Space:** what's taking up room, and which app it belongs to. The caches and logs apps keep for every account,
+ and the crash reports macOS keeps, in the Library at the top of the disk, go through Peel's helper when an
+ administrator owns them, and what macOS keeps there for its own services is never listed.
- **File Search:** large or old files, found through Spotlight.
What you select on these pages, iCloud Drive aside, stays selected while you look at the others, and Move to Trash