https://github.com/abdorrahmani/clearance
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.
https://github.com/abdorrahmani/clearance
cleaner cleanup cleanup-script docker-cache go golang npm-cache windows windows-11 winsxs yarn-cache
Last synced: 9 months ago
JSON representation
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.
- Host: GitHub
- URL: https://github.com/abdorrahmani/clearance
- Owner: abdorrahmani
- License: mit
- Created: 2025-06-09T07:18:44.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2025-06-09T08:39:16.000Z (10 months ago)
- Last Synced: 2025-06-09T08:43:50.942Z (10 months ago)
- Topics: cleaner, cleanup, cleanup-script, docker-cache, go, golang, npm-cache, windows, windows-11, winsxs, yarn-cache
- Language: Go
- Homepage:
- Size: 12.7 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐งน Clearance
[](https://golang.org)
[](LICENSE)
[](https://www.microsoft.com/windows)
[](https://docs.microsoft.com/powershell)
[](https://goreleaser.com)
[](https://www.docker.com)
[](https://www.npmjs.com)
[](https://yarnpkg.com)
[](https://github.com/features/actions)
[](https://goreportcard.com/report/github.com/abdorrahmani/clearance)
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
```bash
go install github.com/abdorrahmani/clearance@latest
```
### Using Binary Release
1. Download the latest release from the [Releases page](https://github.com/abdorrahmani/clearance/releases)
2. Extract the ZIP file
3. Run `run-clearance.bat` or `clearance.exe` directly
## ๐ป Usage
### Command Line Interface
```bash
clearance [--npm] [--yarn] [--docker] [--winsxs] [--all]
```
### Interactive Mode
Simply run:
```bash
clearance
```
### Examples
```bash
# 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
```bash
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](LICENSE) file for details.
## ๐ Support
If you need help or have questions, please visit [anophel.com/en/contact-us](https://anophel.com/en/contact-us)
---
Made with โค๏ธ by [Abdorrahmani](https://github.com/abdorrahmani)