Lightweight Disk Space & Comprehensive Dependency Optimizer for Linux & macOS Systems Created by monx.one
SpaceGuard is an intelligent, low-footprint system utility designed specifically for Debian, Kali Linux, Ubuntu, and macOS environments. Built on a strict "Monitor Everything" policy, SpaceGuard captures and categorizes 100% of data occupying disk storage β including system packages (apt/brew), custom binary downloads (wget/curl), Docker & Podman container layers, system caches, user trash bins, and external USB ingests.
- Folder & Application Modes: Switch seamlessly between directory hierarchy breakdown (
/usr,/var,/home,/opt,~/Library,/tmp) and granular application/download tiles. - Hover & Metrics Summary: View exact disk footprint (MB/GB), percentage of used storage, path location, first discovered date, and last access date on hover.
- Contextual Actions: Right-click any tile to copy paths, inspect dependencies in the D3 graph, quick-clean/purge resources, or add items to the protected safeguard exclude list.
- Factual Disk State Audit: Scans system packages (
dpkg/brew),/var/cache/apt/archives,~/Library/Caches, user Trash bins, custom downloads, and USB ingests. - Container Runtime Scrapers: Detects dangling Docker, Podman & OrbStack overlay images (
/var/lib/docker/overlay2,~/.orbstack), exited containers, and unused pods. - Zero-Wait Ingestion: Immediately indexes pre-existing tools and downloads on filled disks without waiting for background event triggers.
- Shared Library Linkage Visualization: Displays real-time relationships between installed software and shared libraries (
libc6,libssl3,.so/.dylib). - Impact Simulation: Visualizes cascading dependency removals before executing destructive commands.
- Dedicated macOS Suite: Includes Homebrew Formula (
macos/Formula/spaceguard.rb), automated installer (macos/install.sh), and Applelaunchddaemon agent (com.monx.spaceguard.daemon.plist). - Native macOS Targets: Cleans Xcode DerivedData, Homebrew caches, and APFS user trash. Detailed guide available at
docs/MACOS_INSTALLATION.md.
Live tracking of system disk space, installed packages, and deep origin tracking for manually downloaded binaries (wget/curl).
Hierarchical treemap breakdown of space-heavy directories (/var/lib/docker, /usr/share, /home/kali, /var/cache).
Visual link analyzer showing library cross-dependencies and simulating cascading removals prior to executing commands.
Real-time container engine inspection, identifying writable layer bloat, stopped pods, and dangling images.
Embedded terminal console allowing direct control over the background SpaceGuard RPC daemon socket.
Download the pre-compiled .deb package directly from the repo:
# Download the package
wget https://github.com/MutantMonx/SpaceGuard/raw/main/pkg/spaceguard_1.2.0_amd64.deb
# Install via dpkg
sudo dpkg -i spaceguard_1.2.0_amd64.deb
# Resolve any missing dependencies automatically
sudo apt-get install -f# Add SpaceGuard repository key and source
echo "deb [trusted=yes] https://raw.githubusercontent.com/MutantMonx/SpaceGuard/main/pkg/ ./" | sudo tee /etc/apt/sources.list.d/spaceguard.list
# Update APT package indexes & install
sudo apt update
sudo apt install spaceguard# Tap and install via Homebrew
brew tap mutantmonx/spaceguard https://github.com/MutantMonx/SpaceGuard
brew install spaceguard
# Start launchd service
brew services start spaceguardcurl -fsSL https://raw.githubusercontent.com/MutantMonx/SpaceGuard/main/macos/install.sh | bashπ Full macOS documentation: See
docs/MACOS_INSTALLATION.mdfor launchd configuration, Xcode cache purge commands, and Homebrew integration.
Ensure Node.js (v18+) is installed on your system:
# Clone the repository
git clone https://github.com/MutantMonx/SpaceGuard.git
cd SpaceGuard
# Install dependencies & start dev mode
npm install
npm run devTo build for production:
npm run build
npm startSpaceGuard includes a command-line interface mimicking the daemon socket RPC:
| Command | Description |
|---|---|
spaceguard status |
Display disk usage breakdown, daemon health, and memory footprint. |
spaceguard scan |
Run a deep diagnostic scan across system packages, containers, and trash. |
spaceguard clean |
Flush APT / Homebrew package cache and user trash bins. |
spaceguard clean-mac |
(macOS only) Purge Homebrew cache, Xcode DerivedData, and ~/.Trash. |
spaceguard autoremove |
Purge orphaned packages and unlinked shared libraries. |
spaceguard containers prune |
Remove dangling Docker/Podman/OrbStack images and stopped containers. |
Run the build script directly or via API endpoint:
bash build-deb.shOutput: pkg/spaceguard_1.2.0_amd64.deb
macos/
βββ Formula/spaceguard.rb # Homebrew Formula
βββ com.monx.spaceguard.daemon.plist # Apple launchd service plist
βββ install.sh # Automated 1-step installer
βββ uninstall.sh # Automated uninstaller
Distributed under the Apache License 2.0. See LICENSE for details.
Contributions, bug reports, and feature requests are welcome! Feel free to check the issues page.
Developed with β€οΈ for Debian, Kali Linux & macOS power users.