Skip to main content
ActiveBashCLIDeveloper ToolsTestingOpen Source

DevSweep

Professional CLI to clean development caches on macOS and safely recover gigabytes of disk space.

DevSweep is a professional CLI tool for macOS that helps developers recover disk space by safely and intelligently cleaning development tool caches.

The Problem

When you develop, you accumulate gigabytes of unnecessary caches:

  • Docker/OrbStack: Old images and containers (5-20GB)

  • JetBrains: Multiple IDE versions and corrupt caches (2-5GB per IDE)

  • Homebrew: Old package versions (500MB-2GB)

  • Node.js: npm, yarn, pnpm caches (5-15GB)

  • Maven/Gradle: Unused dependencies

In my case, I recovered 23GB the first time I ran DevSweep.

Features

  • 🛡️ Safety first: Dry-run mode to preview actions before executing

  • 🎛️ Interactive menu: Guided interface for ease of use

  • 🔧 Modular architecture: Clean, testable and extensible code

  • ⚠️ Explicit confirmations: Manual approval for destructive operations

  • 📊 Smart analysis: Shows the space that will be recovered

  • 🎨 Professional output: Organized logs with colors and progress indicators

  • ✅ 100% tested: 101 tests, 123 assertions, all passing

  • 🚀 Fast: Optimized to complete in seconds

Cleanup Modules

JetBrains IDEs

  • Removes old versions of IntelliJ, WebStorm, PyCharm, etc.

  • Automatically cleans corrupt caches

  • Intelligently preserves the latest version

Docker/OrbStack

  • Removes stopped containers

  • Cleans unused images

  • Removes orphan volumes

Homebrew

  • Cleans download caches

  • Removes old package versions

Dev Tools

  • Maven and Gradle (old dependencies)

  • npm, yarn, pnpm (global caches)

  • nvm (download caches)

  • SDKMan (temporary files)

System

  • User and system logs

  • Application caches

  • Trash

Technologies

  • Bash 5.0+: Modern shell scripting

  • Bashunit: Professional testing framework for Bash

  • Make: Orchestration and automation

  • Shellcheck: Code linting

Development with Testing

I applied TDD and clean code principles in Bash:

bash
function test_jetbrains_cleanup_removes_old_versions() {
    # Arrange
    setup_test_environment
    create_fake_jetbrains_versions "2023.1" "2023.2" "2024.1"
    
    # Act
    cleanup_jetbrains --keep-latest
    
    # Assert
    assert_directory_exists "$JETBRAINS_PATH/2024.1"
    assert_directory_not_exists "$JETBRAINS_PATH/2023.1"
}

Testing Stats:

  • 101 tests passing

  • 123 assertions

  • ~11 seconds execution time

  • Complete module coverage

Installation

bash
# Clone repository
git clone https://github.com/Sstark97/dev_sweep.git
cd dev_sweep
make install

Links

Statistics

Stars
30
Forks
4
Last commit
2026-02-05
License
MIT

Tech Stack

BashCLIDeveloper ToolsTestingOpen Source