Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

60%
+1 −0
Q&A How do package managers track the installed files?

Homebrew has different commands for brew uninstall {package} to remove the executable(s) versus brew zap {package} which further performs arbitrary extra cleanup steps specified by the formula.[1] ...

posted 7mo ago by Michael‭

Answer
#1: Initial revision by user avatar Michael‭ · 2026-02-11T18:04:30Z (7 months ago)
[Homebrew][] has different commands for `brew uninstall {package}` to remove the executable(s) versus `brew zap {package}` which further performs arbitrary extra cleanup steps specified by the formula.[^formula]

The zap steps are usually deletion of user data and caches, letting a user decide between just removing the application files or explicitly purging their history.

Here's the `zap` stanza [for Firefox][ff]:

```ruby
cask 'firefox' do
  # ...

  zap trash: [
        "/Library/Logs/DiagnosticReports/firefox_*",
        "~/Library/Application Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/org.mozilla.firefox.sfl*",
        "~/Library/Application Support/CrashReporter/firefox_*",
        "~/Library/Application Support/Firefox",
        "~/Library/Caches/Firefox",
        "~/Library/Caches/Mozilla/updates/Applications/Firefox",
        "~/Library/Caches/org.mozilla.crashreporter",
        "~/Library/Caches/org.mozilla.firefox",
        "~/Library/Preferences/org.mozilla.crashreporter.plist",
        "~/Library/Preferences/org.mozilla.firefox.plist",
        "~/Library/Saved Application State/org.mozilla.firefox.savedState",
        "~/Library/WebKit/org.mozilla.firefox",
      ],
      rmdir: [
        "~/Library/Application Support/Mozilla", #  May also contain non-Firefox data
        "~/Library/Caches/Mozilla",
        "~/Library/Caches/Mozilla/updates",
        "~/Library/Caches/Mozilla/updates/Applications",
      ]
end
```


[^formula]: "Formula" is Homebrew's term for the code that specifies an installable package.

[homebrew]: https://brew.sh
[ff]: https://github.com/Homebrew/homebrew-cask/blob/main/Casks/f/firefox.rb