Open source

Linux Soft Cleaner

A small, safe disk cleanup tool for Linux servers

BetaRustMIT

About

A command line tool that frees disk space on Linux servers. It removes old files in /tmp, APT, DNF, YUM and Pacman package caches, and rotated logs under /var/log. It can also clean the Docker and NPM caches on request. Run it with --dry-run first to see what would be deleted. The project is in beta and has no automated tests yet.

Features

  • Preview with --dry-run without deleting anything
  • Cleans old files in /tmp by an age threshold (--days, default 7)
  • APT, DNF, YUM and Pacman package caches
  • Rotated log files under /var/log
  • docker system prune with --docker, ~/.npm/_cacache cleanup with --npm

Requirements

Rust 1.85+ to build from source (edition 2024); Linux or macOS release binaries

Install

cargo install --git https://github.com/Ankara-Software/linux-soft-cleaner
curl -fsSL https://raw.githubusercontent.com/Ankara-Software/linux-soft-cleaner/master/install.sh | sh

Usage

linux-soft-cleaner --dry-run
sudo linux-soft-cleaner
sudo linux-soft-cleaner --days 30 --docker --npm

Want to contribute?

Bug reports and pull requests are handled on GitHub.