Skip to content

A lightweight CLI tool to clean up development caches and free up disk space. Built with Go, Clearance helps you maintain a clean development environment by removing unnecessary cache files.

License

Notifications You must be signed in to change notification settings

abdorrahmani/clearance

Repository files navigation

🧹 Clearance

Go Version License Windows PowerShell GoReleaser Docker npm Yarn GitHub Actions Go Report Card

A lightweight CLI tool to clean up development caches and free up disk space. Built with Go, Clearance helps you maintain a clean development environment by removing unnecessary cache files.

🚀 Features

  • 🧹 Clean npm cache
  • 🧶 Clean yarn cache
  • 🐳 Clean Docker cache (optional)
  • 🪟 Clean Windows WinSxS temp files
  • 🔒 Safe, selectable cleanup operations
  • 🎨 Beautiful CLI interface with color support
  • ⚡ Fast and efficient cleanup operations

📋 Requirements

  • Go 1.21 or higher
  • Administrator privileges (required for system folders and Docker commands)
  • npm, yarn, and/or Docker in PATH (if using respective cleanup options)

🛠️ Installation

Using Go Install

go install github.com/abdorrahmani/clearance@latest

Using Binary Release

  1. Download the latest release from the Releases page
  2. Extract the ZIP file
  3. Run run-clearance.bat or clearance.exe directly

💻 Usage

Command Line Interface

clearance [--npm] [--yarn] [--docker] [--winsxs] [--all]

Interactive Mode

Simply run:

clearance

Examples

# Clean npm and yarn caches
clearance --npm --yarn

# Clean everything
clearance --all

# Clean only Docker cache
clearance --docker

🔧 Options

Flag Description
--npm Clean npm cache
--yarn Clean yarn cache
--docker Clean Docker cache
--winsxs Clean WinSxS temp files
--all Clean all caches

⚠️ Safety Notes

  • 🔒 Always run with administrator privileges
  • 🛡️ The tool only cleans known-safe locations
  • 📁 For WinSxS, only the Temp directory is cleaned
  • 🐳 Docker cleanup uses official Docker commands

🛠️ Development

Building from Source

git clone https://github.com/abdorrahmani/clearance.git
cd clearance
go build -o clearance.exe

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m '✨ feat: add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📝 License

This project is licensed under the MIT License - see the LICENSE file for details.

🌟 Support

If you need help or have questions, please visit anophel.com/en/contact-us


Made with ❤️ by Abdorrahmani

About

A lightweight CLI tool to clean up development caches and free up disk space. Built with Go, Clearance helps you maintain a clean development environment by removing unnecessary cache files.

Topics

Resources

License

Stars

Watchers

Forks