- Deep System Cleanup - Deep system cleaning - caches, logs, temp files, APT/Snap/Flatpak cleanup, telemetry removal
- Thorough Uninstall - Multi-package manager support (APT, Snap, Flatpak, AppImage) with fzf fuzzy finder
- System Optimization - Performance tuning, cache rebuilds, TLP/auto-cpufreq power management for laptops
- Interactive Disk Analyzer - Navigate folders with arrow keys, find and delete large files quickly
- Swap File Manager - Create/manage swap files with interactive size selection
- Security Hardening - UFW firewall and Fail2Ban setup with sensible defaults
- Startup Manager - Enable/disable auto-start programs to improve boot time
- Fast & Lightweight - Terminal-based with fzf fuzzy finder, arrow-key navigation, and batch operations
Install:
curl -fsSL https://raw.githubusercontent.com/tw93/mole/main/install.sh | bashOr via Homebrew:
brew install tw93/tap/moleRun:
fub # Interactive menu (7 options)
fub clean # System cleanup
fub clean --dry-run # Preview mode
fub clean --whitelist # Manage protected caches
fub uninstall # Uninstall apps (APT, Snap, Flatpak, AppImage)
fub optimize # System optimization & performance tuning
fub analyze # Disk analyzer
fub swap # Swap file manager
fub security # Security hardening (UFW, Fail2Ban)
fub startup # Startup applications manager
fub touchid # Configure Touch ID for sudo (macOS only)
fub update # Update Fub
fub remove # Remove Fub from system
fub --help # Show help
fub --version # Show installed version
- Safety first, if your Ubuntu system is mission-critical, wait for Fub to mature before full cleanups.
- Preview the cleanup by running
fub clean --dry-runand reviewing the generated list. - Use
fub clean --whitelistto manage protected caches. - Use
fub touchidto approve sudo with Touch ID instead of typing your password.
$ fub clean
Scanning cache directories...
β User app cache 45.2GB
β Browser cache (Chrome, Safari, Firefox) 10.5GB
β Developer tools (Xcode, Node.js, npm) 23.3GB
β System logs and temp files 3.8GB
β App-specific cache (Spotify, Dropbox, Slack) 8.4GB
β Trash 12.3GB
====================================================================
Space freed: 95.5GB | Free space now: 223.5GB
====================================================================$ fub uninstall
Select Apps to Remove
βββββββββββββββββββββββββββ
βΆ β Adobe Creative Cloud (12.4G) | Old
β WeChat (2.1G) | Recent
β Final Cut Pro (3.8G) | Recent
Uninstalling: Adobe Creative Cloud
β Removed application
β Cleaned 52 related files across 12 locations
- Application Support, Caches, Preferences
- Logs, WebKit storage, Cookies
- Extensions, Plugins, Launch daemons
====================================================================
Space freed: 12.8GB
====================================================================$ fub optimize
System: 5/32 GB RAM | 333/460 GB Disk (72%) | Uptime 6d
β Rebuild system databases and flush caches
β Reset network services
β Refresh Finder and Dock
β Clean diagnostic and crash logs
β Purge swap files and restart dynamic pager
β Rebuild launch services and spotlight index
====================================================================
System optimization completed
====================================================================$ fub analyze
Analyze Disk ~/Documents | Total: 156.8GB
βΆ 1. βββββββββββββββββββ 48.2% | π Library 75.4GB >6mo
2. βββββββββββββββββββ 22.1% | π Downloads 34.6GB
3. βββββββββββββββββββ 14.3% | π Movies 22.4GB
4. βββββββββββββββββββ 10.8% | π Documents 16.9GB
5. βββββββββββββββββββ 5.2% | π backup_2023.zip 8.2GB
ββββ Navigate | O Open | F Reveal | β« Delete | L Large(24) | Q Quit$ fub swap
Current Memory Status
βββββββββββββββββββββββββββββββββββββββββββββββ
RAM: Total: 8.0G | Used: 2.5G | Free: 5.5G
Swap: No swap file configured
Select swap file size:
βΆ 2GB
4GB
8GB
16GB
32GB
Custom
Remove Swap
Cancel
Creating 8GB swap file...
β Creating 8GB swap file (this may take a moment)...
β Setting permissions...
β Formatting as swap...
β Enabling swap...
β Adding to /etc/fstab for persistence...
β Swap file created successfully!$ fub security
Current Security Status
βββββββββββββββββββββββββββββββββββββββββββββββ
UFW Firewall: Not installed
Fail2Ban: Not installed
SSH Server: Running
Select security action:
βΆ Setup UFW Firewall
Setup Fail2Ban
Show UFW Rules
Show Fail2Ban Status
Exit
Setting up UFW Firewall...
β Installing UFW...
β Configuring default policies...
β Allowing SSH (port 22)...
Allow HTTP (port 80)? [y/N]: y
β HTTP allowed
β UFW Firewall configured and enabled!$ fub startup
Startup Applications Status
βββββββββββββββββββββββββββββββββββββββββββββββ
Total: 12 startup applications
Enabled: 8 active
Disabled: 4 inactive
User apps: 5 applications
System apps: 7 applications
Select action:
βΆ Disable Apps
Enable Apps
Remove User Apps
List All Apps
Exit
Select startup apps to DISABLE: (Tab: select, Ctrl-A: all)
βΆ β [ENABLED ] [USER ] Dropbox
β [ENABLED ] [SYSTEM] GNOME Keyring
β [ENABLED ] [USER ] Slack Startup
Disabling startup applications...
β Disabled: Dropbox
β Disabled: Slack Startup
β Disabled 2 startup application(s)Fub supports environment variables for non-interactive configuration:
FUB_REMOVE_BLOAT=true # Remove bloatware packages (gnome-games, etc.)
FUB_REMOVE_TELEMETRY=true # Disable Ubuntu telemetry (apport, whoopsie)
FUB_CLEAR_PRIVACY_LOGS=true # Clear privacy logs (default: true)FUB_INSTALL_NERDFONTS=true # Install Nerd Fonts (JetBrains, FiraCode, etc.)
FUB_INSTALL_TLP=true # Install TLP power management (laptops only)
FUB_INSTALL_AUTOCPUFREQ=true # Install auto-cpufreq (alternative to TLP)FUB_SWAP_SIZE=8 # Create swap file with specified size in GBFUB_SETUP_UFW=true # Auto-setup UFW firewall
FUB_SETUP_FAIL2BAN=true # Auto-setup Fail2Ban# Deep privacy cleanup
FUB_REMOVE_TELEMETRY=true FUB_REMOVE_BLOAT=true fub clean
# Full laptop optimization
FUB_INSTALL_TLP=true FUB_INSTALL_NERDFONTS=true fub optimize
# Create 16GB swap file
FUB_SWAP_SIZE=16 fub swap
# Auto-configure security
FUB_SETUP_UFW=true FUB_SETUP_FAIL2BAN=true fub securityLaunch Fub commands instantly from Raycast or Alfred:
curl -fsSL https://raw.githubusercontent.com/tw93/Fub/main/scripts/setup-quick-launchers.sh | bashAdds 4 commands: clean, uninstall, optimize, analyze. Auto-detects your terminal or set MO_LAUNCHER_APP=<name> to override.