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.

Keep the documents true to the latest fixes

Țugui Dragoș9ad954b93329
diff --git a/AGENTS.md b/AGENTS.md
index e9f4e9dc..70c8321a 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -192,20 +192,19 @@ If you are unsure whether something belongs in the helper, it doesn't.
waits for the thing it measures (a program's end, a file's change), and work it waits on runs at user-initiated
priority rather than the default. A test that reads this Mac through a tool (`pluginkit`, `mdfind`) waits for the
tool's whole answer, never the time limit the page gives it: a runner with three processors takes longer.
-- The files a test scans sit in a temporary home, never in yours, and nothing is registered with Launch Services
- from a test. In the package's tests that home is a `TemporaryDirectory`, which takes it away when the test ends,
- and no other test there names the temporary folder (`TemporaryDirectoryTests`); a test of the app removes the
- folder it made before it returns. An app a test expects Peel to act on is a made-up one, named under a domain kept
- for examples
+- The files a test scans sit in a temporary home, never in yours, and nothing is registered with Launch Services from a
+ test. In the package's tests that home is a `TemporaryDirectory`, which takes it away when the test ends, and no other
+ test there names the temporary folder (`TemporaryDirectoryTests`); a test of the app removes the folder it made before
+ it returns. An app a test expects Peel to act on is a made-up one, named under a domain kept for examples
(`org.example`, `com.example`, `net.example`). A program a test starts from a folder of its own is a copy of
- `/bin/cat` signed ad hoc (`TemporaryDirectory.runningProgram`, or `runningPrograms` for several): macOS kills a
- plain copy of one of its own programs started from anywhere else, usually within a second, for breaking its launch
+ `/bin/cat` signed ad hoc (`TemporaryDirectory.runningProgram`, or `runningPrograms` for several): macOS kills a plain
+ copy of one of its own programs started from anywhere else, usually within a second, for breaking its launch
constraints. Every copy is made before any starts, since once a program inside an app runs, macOS takes away other
- processes' right to write into that app. A copy is handed to the test only once it has echoed a line written to
- it, since until then Gatekeeper checks it where it started and ends it if the test has moved it, and it runs until
- the test ends it or the suite ends and its input closes: letting go of the `Process` ends nothing. A folder a
- test makes never ends in a package's extension: `org.example.App` is an app to macOS and to Peel, so nothing
- inside it is looked at as a folder's contents.
+ processes' right to write into that app. A copy is handed to the test only once it has echoed a line written to it,
+ since until then Gatekeeper checks it where it started and ends it if the test has moved it, and it runs until the
+ test ends it or the suite ends and its input closes: letting go of the `Process` ends nothing. A folder a test makes
+ never ends in a package's extension: `org.example.App` is an app to macOS and to Peel, so nothing inside it is looked
+ at as a folder's contents.
- **A test of the app writes nothing of the person's.** Its preferences live in a domain of its own
(`MadeUpDefaults`), and it never calls what writes Peel's own folder, such as `AppLibrary.refresh()`, which
remembers the apps it read.
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.md
index 674fd1ec..fe60aadf 100644
--- a/ARCHITECTURE.md
+++ b/ARCHITECTURE.md
@@ -82,7 +82,9 @@ the Homebrew page's uninstall and cleanups are Homebrew's own.
plug-in and a container named by a UUID are also weighed by the identifier they declare: a plug-in's name says
what it does and a UUID says nothing, so the identifier decides whose they are. A launch job is weighed by the
program it runs, since anyone can name its file: a job that runs a program inside the app is the app's, and one
- that runs a program inside another installed app is that app's. The answer is a `LeftoverMatch`: a confidence
+ that runs a program inside another installed app is that app's. What macOS keeps for its own services under a
+ plain name directly in a Library folder, such as `Application Support/Knowledge`, is no app's, whatever app is
+ called by that name (`SystemFolders`). The answer is a `LeftoverMatch`: a confidence
(`certain`, `likely`, or `possible`), the reason, the other installed apps that claim the file too (with the apps
of the same maker that macOS knows outside the Applications folders, the apps Peel saw installed before, whose
identifiers stay theirs once they are gone, and, for a file only the app's name claims, another maker's app whose
@@ -111,7 +113,7 @@ the Homebrew page's uninstall and cleanups are Homebrew's own.
its own (`TrashService`'s
`trash(apps:thenFiles:usingHelperFor:lettingTheirProgramsRun:emptiedFoldersNamed:)`, which an app's page,
several apps' page, Remove Peel, and `peel uninstall` share). A folder named for the app or its maker that the
- move leaves empty goes with them (`MakersFolders`).
+ move leaves empty goes with them, unless macOS keeps it under that name for its own services (`MakersFolders`).
- `TrashService` asks `RemovalGuard` about each item first, holds the folder around the item open, asks again
about what the kernel calls that folder, and moves the item through it, so the thing judged is the thing
moved. Items only an administrator can move go through the helper, and the links an app's tools and their
@@ -210,9 +212,12 @@ A handful of ideas carry most of the weight. Each is enforced in one place and t
never as text, since a slash and a combining mark after it are one Swift `Character`. The guard also refuses
anything that syncs to other devices (`SyncedFolders`): what iCloud or a File Provider keeps, and what sits in a
folder Syncthing, Resilio Sync, Synology Drive Client, or MEGA keeps in step, since the Trash would take it from
- those devices too.
+ those devices too. It looks a level or two inside a folder for a library, a wallet, or work kept only in a cache,
+ and refuses a folder holding a folder macOS won't let Peel list, unless only the helper can move it, which looks
+ inside as root (`ProtectedData.Finding`).
- **Exclusions everywhere.** The user's exclusions reach every scanner, so an excluded item never appears, and
- a folder with something excluded inside is never moved.
+ a folder with something excluded inside is never moved, nor one Peel can't look into for an excluded app, since the
+ helper knows nothing of the exclusions.
- **Unknown stays unknown.** A size that couldn't be measured, a list a tool didn't give, an answer that didn't
come, whether an item is still in the Trash when macOS won't let Peel look (`TrashedItem.standing`): each is
kept as not known, shown as such, never selected for the user, and never forgotten from History.
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 28bec540..0d3957d0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -217,9 +217,9 @@ its changes the way [Keep a Changelog](https://keepachangelog.com/) suggests.
#### Homebrew
-- Clean Up, the download cleanups, and Uninstall run nothing while Peel can't read Homebrew's Cellar, or a formula's
- folder in it, and say so: Homebrew deletes old versions for good, and Peel couldn't tell it which formulae your
- exclusions cover.
+- Clean Up, the download cleanups, and Uninstall run nothing while Peel can't read Homebrew's Cellar, or can't look into
+ a formula's folder in it for an app you excluded, and say so: Homebrew deletes old versions for good, and Peel
+ couldn't tell it which formulae your exclusions cover.
#### Space
@@ -241,6 +241,9 @@ its changes the way [Keep a Changelog](https://keepachangelog.com/) suggests.
- The command `peel uninstall` offers to copy works for an app whose name begins with `-` or `=`: the name comes last,
quoted where a shell would read it otherwise, and after `--` when it begins with `-`, so it isn't read as an option.
+- `peel leftovers` and `peel uninstall` say that a file found by its name inside a folder of macOS's own, such as
+ `SyncServices`, sits inside a folder that belongs to macOS or to another installed app, as the app's row says, rather
+ than inside another app's folder.
### Security
diff --git a/SAFETY.md b/SAFETY.md
index d22dff69..6c78736c 100644
--- a/SAFETY.md
+++ b/SAFETY.md
@@ -338,7 +338,7 @@ Only matches Peel is `certain` or `likely` about, and only when nothing else ins
- **An empty folder of the app's maker goes too.** A folder in your Library or the Mac's named for the app or its
maker, such as `Application Support/<Maker>`, that an uninstall leaves empty goes to the Trash with it, through the
helper when its files went that way; one with anything left inside, a hidden file included, one with another name,
- and the Library folder itself stay.
+ one macOS keeps for its own services under that name, and 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 and AnyConnect, ESET Endpoint Security, Microsoft Defender,
@@ -525,14 +525,14 @@ page and whatever its bundle is called, nor a folder that holds it a level or tw
identifier, such as its caches or its container, is left out of every page and never moved, nor is a folder holding
one a level or two down, nor one with a folder inside that macOS won't let Peel list, since such a folder may be in
there: that holds even for what only the helper could move, as the helper knows nothing of your exclusions. Its other
-files, such as plug-ins, receipts, or a folder named after the app, are excluded
-only by their own paths, so to keep them, exclude them too.
+files, such as plug-ins, receipts, or a folder named after the app, are excluded only by their own paths, so to keep
+them, exclude them too.
Exclusions reach the Homebrew page too, since Homebrew deletes for good: Peel never runs `brew uninstall` for a
package whose app, or whose own folder, you excluded, nor for one with a folder Peel can't look into for an app you
excluded, nor for any package while your list isn't read or can't be, and Homebrew's cleanup keeps every formula whose
-folder you excluded. While Peel can't read Homebrew's Cellar, or a formula's folder in it, nothing that deletes
-formulae runs at all.
+folder you excluded. While Peel can't read Homebrew's Cellar, or can't look into a formula's folder in it for an app
+you excluded, nothing that deletes formulae runs at all.
If the saved list is there and cannot be read, Peel does not treat it as empty. It moves nothing until you
start over in Settings, `peel` refuses, and the file it could not read is kept beside the new one.