• Stars
    star
    138
  • Rank 264,508 (Top 6 %)
  • Language
    Ruby
  • Created almost 2 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Use rules from Homebrew Cask to scan for leftover files from uninstalled software.

Homebrew Leftover Scanner

Use rules from Homebrew Cask to scan for leftover files from uninstalled software.

3413 casks are supported now.

Currently an MVP version, TODO list:

  • Support detecting launchctl and login_item

Known issues:

  • JetBrains' IDEs will be detected as uninstalled if you install them via JetBrains Toolbox

Screenshot

Install & Usages

Install via brew tap:

brew tap jysperm/leftover-scanner
brew tap homebrew/cask # If you haven't tapped before (Homebrew don't do this by default since 4.0)

Run it:

brew scan-leftovers

This script doesn't actually delete files, you can follow the instructions in the output to run brew uninstall (at your own risk):

$ brew scan-leftovers
==> 4154 casks to scan ...
==> Installed from cask:
netspot, slack, sketch, steam, brave-browser, powerphotos, downie, paw, tg-pro, clashx, imazing, visual-studio-code, electrum, logseq, handbrake, obs, netnewswire, iterm2, numi, gitup, docker, blender, telegram, discord, wireshark, firefox, iina, google-chrome, zoom, grammarly, squirrel, bettertouchtool, keka, xbar
==> Installed from other ways:
bitwarden, wechat, planet, qq, medis
==> Found leftovers from bitbar, get rid of them via:
==> brew uninstall -f --zap bitbar
/Users/jysperm/Library/Caches/com.matryer.BitBar (trash 3 files, 84.2KB)
/Users/jysperm/Library/Preferences/com.matryer.BitBar.plist (trash 531B)
==> Found leftovers from epic-games, get rid of them via:
==> brew uninstall -f --zap epic-games
/Users/jysperm/Library/Application Support/Epic (trash 264B)
==> Found leftovers from setapp, get rid of them via:
==> brew uninstall -f --zap setapp
/Users/jysperm/Library/Application Scripts/com.setapp.DesktopClient.SetappAgent.FinderSyncExt (trash 64B)
/Users/jysperm/Library/Caches/com.setapp.DesktopClient (trash 3 files, 84.2KB)
/Users/jysperm/Library/Caches/com.setapp.DesktopClient.SetappAgent (trash 4 files, 6.1MB)
/Users/jysperm/Library/Logs/Setapp (trash 7 files, 344.8KB)

Full Disk Access

Full Disk Access is required for this script to scan paths across the entire file system.

Please enable Full Disk Access for your terminal under System Preferences > Security & Privacy > Privacy > Full Disk Access.

About the rules

Most Homebrew casks have a zap section, it contains the cache files or logs of that software which can be deleted when you are no longer using it.

However brew doesn't delete these files by default, so the zap section may not be well maintained. If you find any issues, you can contribute to the official homebrew-cask repository.

$ brew cat bitbar
cask "bitbar" do
  version "1.10.1"
  sha256 "8a7013dca92715ba80cccef98b84dd1bc8d0b4c4b603f732e006eb204bab43fa"

  url "https://github.com/matryer/bitbar/releases/download/v#{version}/BitBar.app.zip"
  name "BitBar"
  desc "Utility to display the output from any script or program in the menu bar"
  homepage "https://github.com/matryer/bitbar/"

  app "BitBar.app"

  zap trash: [
    "~/Library/BitBar Plugins",
    "~/Library/Caches/com.matryer.BitBar",
    "~/Library/Preferences/com.matryer.BitBar.plist",
  ]
end

More Repositories

1

rollup

一个去中心化的、可验算的、难以操控的抽奖程序。
JavaScript
91
star
2

hexo-theme-simpleblock

Hexo theme of jysperm's blog.
HTML
70
star
3

blog

Source code of my blog
EJS
66
star
4

elecpass

A password manager based on GPG and Git compatible with pass
JavaScript
66
star
5

WizardChess

Search-based low-intelligence international chess AI with visible UI
TypeScript
31
star
6

RootPanel2

Old version of RootPanel.
PHP
25
star
7

Mabolo

Just a simple ORM of MongoDB API.
CoffeeScript
25
star
8

LightPHP

A Light PHP Library
PHP
24
star
9

passwords

My password store
Shell
22
star
10

playbooks

Infrastructure as Code of my servers, NAS and router
HTML
21
star
11

ZeroMS-1x

Old version of ZeroMS, an IM application based on Qt.
C++
21
star
12

RPUP

**DEPRECATED** A simple file sharing application in PHP.
PHP
19
star
13

china-id-card-validator

Validator for China's ID Card.
CoffeeScript
14
star
14

cats-blog

Blog for my cats, pidan & doufu
HTML
14
star
15

play-cards

基于 LeanCloud 实现卡牌对战游戏
TypeScript
13
star
16

Cichorium

Routing framework based on Promise using CoffeeScript
CoffeeScript
13
star
17

weapp-booklist

WeChat App demo based on LeanCloud
JavaScript
11
star
18

nohttps.org

Not Only HTTPS
HTML
10
star
19

TeaPot

A mini HTTP Server.
C
8
star
20

mysql-querier

Use simple JSON to query from MySQL, and prevent SQL-injection attacks
CoffeeScript
7
star
21

deploybeta

A simple container platform based on reliable solutions.
Go
7
star
22

jybox.net

Source code of jybox.net
HTML
6
star
23

slides

Slides of my online and offline talks
6
star
24

caipai.fm

Moved into jysperm/blog
HTML
6
star
25

dir2cast

Turn .mp3 files in current directory to a podcast feed just one command.
Go
5
star
26

express-explorer

Generate API document from express meta data.
CoffeeScript
4
star
27

shortcuts

My iOS Shortcuts
4
star
28

dotfiles

Some configuration files and guide about install development Environment.
Ruby
3
star
29

leancloud-budget

LeanCloud QPS/并发 计算器
JavaScript
2
star
30

my-github-profile

Show your GitHub profile on the status bar
CoffeeScript
2
star
31

Wheel

Data structures and part of standard library in C/C++.
C
2
star
32

JyNet2

Includes CMS, BBS, and Blog, written when I was 14 years old.
ASP
1
star