One command. Every terminal.

ByteSweep CLI tells you why a disk is full, then frees the space safely. It runs on macOS, Windows, Linux and Unix, on your own computer or on a server over SSH.

  • Free on every machine. No licence, no key, no trial, no account.
  • Looks before it cleans. Every command is shown before it runs.
  • Undo for 7 days. What you clean by hand can be put back.

Watch the 40-second demo

macOS

curl -fsSL https://bytesweep.app/install-cli.sh | sudo sh

Paste it into Terminal. It checks the published checksum and installs nothing if it doesn't match.

Windows

irm https://bytesweep.app/install-cli.ps1 | iex

Paste it into PowerShell opened as administrator. It checks the published checksum first.

Linux and Unix

curl -fsSL https://bytesweep.app/install-cli.sh | sudo sh

Paste it into any shell, over SSH too: Linux, FreeBSD, OpenBSD, NetBSD, Solaris, illumos and AIX.

macOS Terminal
% sudo bsweep why
/ is 97% full: 12.5 GB free of 460.4 GB.
  - 2.2 GB can go with no risk, 12.3 GB more
    after a look. See Clean.
  - /Users is taking 301.1 GB.
  - /Applications is taking 16.0 GB.
Next: sudo bsweep clean --safe --dry-run

Then ask it why the disk is full. Output from a real run on a Mac.

How bsweep clean sorts what it finds. Examples of each kind. Your disk makes its own list.

Safe to clear

It comes back by itself, or nothing depends on it. Ticked for you.

  • Package downloads kept after installing
  • System journal and rotated logs, older days
  • Old snap versions
  • Docker build cache and leftover layers

sudo bsweep clean --safe

Review first

It can matter to someone. Never ticked for you: you pick each one.

  • AI models you downloaded
  • Live logs over 1 GB
  • Old deploy releases, the live one and 3 newest kept
  • The Trash and the Recycle Bin

sudo bsweep clean

Keep

Explained, never cleaned, even as administrator.

  • Databases: you get their own command
  • Docker volumes
  • The newest snapshot of each kind
  • Paths under keep in your settings file

bsweep databases

Forty seconds, start to finish.

ByteSweep CLI in a terminal, then your servers on the Servers page of the desktop apps. Shown with sample data. You can also step through a terminal recording at your own pace.

A full-screen app in the same file.

Type bsweep with nothing after it. Every command is also a screen, with mouse support and live disk gauges. Old terminals get the same screens in plain ASCII.

  1. The full disk, what fills it and the next step, in a few lines. On a disk at 100%, Rescue frees just enough and writes nothing to it.

    sudo bsweep why
  2. Everything the rules found, safest first: package caches, old logs, build caches, AI models you haven't used. Databases and Docker volumes are never offered.

    sudo bsweep clean --safe
  3. Live shows the processor, memory, network and disks as they happen. Advanced adds every core with its own history, where memory goes, and the load over 1, 5 and 15 minutes. Press a on Live to switch.

    bsweep advanced on
  4. Files and whole folders with the same bytes, largest saving first. Hard links count once. One copy of each always stays; the rest wait in Undo.

    bsweep dupes /srv --keep newest
  5. Everything listening: the program, its user, how long it has run, and the project or container it belongs to. sshd and the system's own are never offered for stopping.

    bsweep ports --open
  6. Shared folders, sharing services, every port other computers can reach, and who can log in, each with a risk and where to switch it off.

    bsweep sharesafe --risky
  7. Each sleep in the last week, every wake with the screen off and what caused it, and what keeps the computer awake right now.

    bsweep sleep
$ bsweep why
The screens are drawn by the real program. They need JavaScript to show here.

The Overview screen, on a test server whose main disk is full.

Written for each system.

The same three bays everywhere, filled with what each system really leaves behind. Each one runs its jobs with the scheduler that system already has.

  1. Knows macOS

    App caches, the Trash, Xcode build data, Homebrew and language caches, crash reports, old logs and Docker. It never touches /System, /Library or /usr, nor ~/Library apart from its caches and logs. Jobs run with launchd, and it lists Login Items too.

  2. Knows Windows

    Downloaded Windows updates, every user's Recycle Bin, Temp folders, crash dumps, web server logs, language caches and Docker. It never touches C:\Windows, Program Files, ProgramData, or AppData apart from Temp. Jobs run with Task Scheduler.

  3. Knows Linux and Unix

    On Linux: the journal, package caches, old kernels and snaps, Docker, Podman and Kubernetes images, old deploys, and deleted files still held open, with systemd or cron. On FreeBSD, OpenBSD, NetBSD, Solaris, illumos and AIX: logs, crash dumps, temporary files and caches. Never /usr, /etc, /boot or the base system.

  4. Leaves the rest alone

    Databases and Docker volumes can't be cleaned, even as administrator; you get the safe command instead. Snapshots go only through the tool that made them, only the ones you choose, and the newest of each stays. SSH and firewall settings are advice only.

The server is up. Something is still wrong.

Checks for what a disk report misses: a database keeping old logs, a site whose folder is gone, a backup job that stopped, a key nobody added. Each check only reads, and says the fix. Alerts tell you when one finds something.

ssh db1, Ubuntu 24.04
$ sudo bsweep alerts run --dry-run
critical site (any name): Its folder /var/www/html is gone: the site answers with errors
critical a new SSH key can log in as www-data (SHA256:Tzz4ZHpc… intruder@evil); bsweep logins accept if it is yours
critical PostgreSQL 16: Replication slot standby1 isn't used and holds back 1.2 GB of WAL: it grows until the disk is full
critical PostgreSQL 16: archive_command is failing: WAL can't be removed until it works

Would send now:
ByteSweep, db1: 4 critical

$ sudo bsweep alerts on --every 30m
On: checked every 30 minutes, told to 1 place.
databases
MySQL and MariaDB binary logs, PostgreSQL WAL held by an unused slot or a failing archive, query logs, MongoDB and Redis files. Each database's size and how fast it grows, with the database's own command to fix it.
sites
Every nginx, Apache and Caddy site: a folder that is gone, a certificate that ends or is missing, a proxy to a port where nothing runs, logs nothing rotates.
jobs
Timers, cron lines and Windows tasks that failed, were due and didn't run, or whose program is gone.
logins
Who logged in over SSH, who keeps guessing, and every key that can log in. A new one makes check critical.
before after
Run them around an upgrade: services that stopped, ports that closed, packages that changed.
alerts
Slack, Discord, Telegram, email or any webhook. Each problem is told once when it starts, and once when it's over.

Keep a server healthy.

A server that is up can still be on its way to trouble. ByteSweep looks ahead, does the routine work on a schedule, and says what each problem means in plain words.

/ will be full around 23 Nov at this rate, in about 14 days; /var/lib/docker grew 1.1 GB a day this week.

bsweep forecast on a test server, from 14 days of the monitor's samples. Health warns when a disk fills within 14 days, and alerts add forecast tells you a week ahead.
A maintenance plan
Daily, weekly or monthly at the hour you pick, always in this order: your backup, security updates, old logs, safe items, services left on old files, and a restart only when the system needs one. SSH, the network and logins are never restarted. Each run leaves a report, kept 90 days.sudo bsweep maintain run --dry-run
A maintenance window
Say when changes may happen, such as Saturday and Sunday from 02:00 to 05:00. The plan, log clearing and cleaning by itself wait for it, and alerts can wait too.sudo bsweep maintain window --days sat,sun --from 02:00 --to 05:00 --pause-alerts
Every problem explained
Each Health finding says what it means, what can happen if it is left, and what to do. Where ByteSweep can fix it, the fix is offered: the preview first, then your yes.sudo bsweep health
Failed services and restarts
Services that failed, with their last log lines and a restart. Whether the server needs a restart and why, then restart in 2 minutes, at 03:00, now, or cancel it.sudo bsweep services restart nginx
Usage history
CPU, memory and each disk's space, recorded every 5 minutes and kept for 30 days.bsweep stats --history --since 7d
ssh web1, Ubuntu 26.04
$ sudo bsweep maintain
Plan: off. To set one: sudo bsweep maintain plan --every weekly --day sun --at 03:00 --steps updates-security,logs,clean-safe,restart-services

Window: off. Unattended changes run at their own times.

Last run
Mon 9 Nov 09:04, asked for, took 6 s
  done    No security updates were waiting.
  done    Cleared logs older than 7d: 66.1 MB back.
  done    Cleaned 1 safe item: 751.2 MB back.
  done    No service was running old files.
  A restart is still needed.

$ sudo bsweep reboot
A restart is needed.
  Updates were installed that only take effect after a restart: the system says so (/var/run/reboot-required).
  Asked for by: libc6, linux-base, linux-image-7.0.0-42-generic
Running for 4 h 19 min.

In 2 minutes would run: shutdown -r +2
To restart: sudo bsweep reboot --yes (in 2 minutes), --at 03:00, or --now. sudo bsweep reboot cancel stops it.

Never lose it.

Backups it sets up for you

restic does the work underneath: encrypted, and only what changed is copied, to another disk, SFTP, S3, Backblaze B2 or a restic REST server. A keep rule thins old copies, 7 daily, 4 weekly and 6 monthly unless you choose. It runs on its own schedule or as the first step of maintenance.

  • Each backup gets its own password, shown once. Keep it off the server: without it, nobody can read the backup.
  • A backup on the same disk as what it protects is refused: one broken disk would take both.
  • Files come back into a new folder, never over today's files. backup check asks restic whether every copy is whole.

sudo bsweep backup add --folders /etc,/srv --to sftp:backup@203.0.113.5:/backups/web1

sudo bsweep backup restore b1 latest --to /root/restored

Snapshots, cleared with care

Deleted files and the space still hasn't come back? A snapshot may be holding them. ByteSweep lists Time Machine local snapshots, Windows restore points and shadow copies, Timeshift, Snapper and ZFS, with dates, and sizes where the tool can say.

  • Nothing is ticked for you, and the newest of each is always kept: it may be the only way back.
  • Each one goes through the system's own tool, with the command shown first. A removed snapshot can't be put back, so it asks.

sudo bsweep snapshots thin

Every server in one table.

Disk, when it fills, updates, problems, maintenance and backups for each saved server, over SSH with your keys, eight at a time. One that can't be reached never holds up the rest.

A laptop, two saved servers
$ bsweep fleet status
SERVER           FULLEST               USED UPDATES         PROBLEMS  MAINTENANCE  BACKUPS  FILLS IN
web1             /                      53% 66 R            2/7       off          old      -
  Out of memory killed: dotnet 69×, rootlesskit 36×, buildkitd 20×, containerd-root 15×, containerd-s…
  shop-worker.service has failed: shop-worker.service: Failed with result 'exit-code'.
db1              can't reach: ssh: connect to host 127.0.0.1 port 2: Connection refused

PROBLEMS is bad/warnings. R: a restart is waiting.

$ bsweep fleet run clean-safe --tag prod --dry-run
Preview: clean-safe on 1 server. Nothing changed.
Clean what is safe to clean: package caches, old journals, temporary files.

web1             ok         Would clean 2 safe items: 3.7 GB.
The same job on many servers
Clean safe items, clear old logs, install security updates, run maintenance or restart a service. Each server's preview comes first; then one server at a time, stopping at the first failure.
Tags
Mark servers as prod, db or anything else, then look at or act on one tag.bsweep host tag web1 prod,db
Each server its own
Each server runs its own ByteSweep, with its own rules and sudo. No password is ever kept: a server needs an SSH key.

Ask your AI assistant.

bsweep mcp lets Claude Desktop, Claude Code, Cursor or VS Code look at this machine and plan the cleanup, with the same rules as the command line.

macOS Terminal
$ bsweep mcp config claude-code
Claude Code
  Run:

    claude mcp add --scope user bsweep -- /usr/local/bin/bsweep mcp

  It can look at this machine and plan changes, but not make them. Add --allow-changes to let it apply a plan after your yes.
It can look
Why the disk is full, what can be cleaned, health, updates, services, databases, snapshots, backups and your servers.
It can plan
A change comes back as a preview with the exact command, for you to read first.
It changes things only with your yes
And only when you started it with --allow-changes. Every change is in bsweep log, made by mcp.
It can't
Run a shell or a command it wrote itself, restart a machine, skip Undo with --now, or set up a backup, whose password belongs on your screen and not in a chat.

When it won't start.

For a computer whose disk is so full it won't start. Write the ByteSweep Rescue USB, start from it, choose the disk and type yes: Rescue frees just enough, safest first, and stops. Nothing on the computer changes before that yes.

  1. Reads what you have

    Linux and Windows disks, encrypted (LUKS) and LVM ones too. It refuses a Windows that is hibernated or was shut down with Fast Startup, and only names Mac disks: use the Mac's own Recovery.

  2. Starts on most PCs

    PCs with UEFI or an older BIOS, and ARM computers with UEFI, with about 1 GB of memory. For now, turn Secure Boot off while you use it.

  3. Writes with care

    rescue-usb checks the image's signature. write never writes to the disk the computer runs from, and reads the stick back to compare.

bsweep rescue-usb

sudo bsweep rescue-usb write --image bsweep-rescue-x86_64.iso --device /dev/sdb

Built for scripts and servers too.

Fixed exit codes, --json on every report, and nothing that waits for a person unless one is there. Copy and sync by name, too: watch that demo.

ssh web2, Ubuntu
$ bsweep check --warn 85 --crit 95
OK
$ echo $?
0
$ bsweep check --warn 10 --crit 95
WARNING / space 41%
WARNING /boot space 17%
$ echo $?
1
Monitoring
Exit 0, 1 or 2 for Nagios and Icinga, alerts to Slack, Discord, Telegram or email, numbers for Prometheus.bsweep check --warn 85 --crit 95
Build runners
Makes room before a job, or fails it with the reason.sudo bsweep ci --min-free 10G
A disk at 100%
Frees just enough, safest first, and writes nothing to the full disk.sudo bsweep rescue
Many servers
One table over SSH, worst first, with nothing left installed.bsweep fleet web1 web2 db1
Live monitor
A sample every 5 minutes, 30 days of history, alerts on your limits.sudo bsweep monitor on
Copy and sync
Save a host once, then copy or sync by name, with the changes shown first.bsweep sync site --preview

Every command.

bsweep help COMMAND shows examples for each one.

See why it's full

  • whyThe full disk, what fills it and the next step, in a few lines
  • topLargest folders or files, or the most files
  • findFiles by size, age and name
  • dupesFiles and folders that are copies, and which copy stays
  • appsInstalled apps and packages, largest first
  • reportEverything found, as text or JSON
  • grownWhat grew, and when the disk will be full
  • watchOne live line while a disk fills
  • diffWhat changed between two reports, such as before and after a deploy

Clean

  • cleanRemoves what the rules found, safest first
  • clean --groupOne group: developer packages, AI models, VMs and containers, chat apps, privacy traces, logs
  • rmRemoves one path, with the same protection
  • undoLists, restores or frees what was cleaned
  • --nowRemove now, no Undo: on rm, dupes, clean, tidy, compress and apps; it asks first
  • undo free --allEmpties Undo at once, or only what is older than --older 3d
  • rescueFrees just enough on a disk at 100%
  • dupes --keepKeeps one copy of each and cleans the rest into Undo
  • apps removeRemoves an app through its own package manager, after its dry run
  • apps leftoversWhat removed apps left behind
  • logs clearClears old logs; live and container logs only if you ask
  • ciMakes room on a build runner, or fails the job with the reason

Files

  • organizeSorts loose files into folders by kind or date; undo puts every file back
  • tidyClears what Downloads collects: old installers, unpacked archives, copies, unfinished downloads
  • renameRenames many files at once, old and new names shown first; undo puts them back
  • convertPictures to JPEG, PNG or GIF, beside the originals
  • compressCompresses logs, dumps and backups, checked against the original, with Undo
  • archiveMoves files to another disk, each checked by checksum, and brings them back

Keep it from filling

  • scheduleClears logs daily, weekly or monthly
  • autoCleans safe items when a disk passes a limit
  • timerDaily record, Undo expiry and a disk alarm
  • monitorA sample every 5 minutes, with alerts
  • alertsTells Slack, Discord, Telegram, email or a webhook when something needs you

Health

  • liveEvery core, memory, network and disk rates, and every program, as it happens
  • statsCPU, memory, network and busiest programs, once
  • advancedBasic or Advanced: every core, where memory goes and the load over 1, 5 and 15 minutes
  • live --detailAdvanced for one run, also on stats
  • healthMemory, services, certificates, updates, backups, firewall, disk encryption, the clock and name lookups
  • drivesEach disk's health from SMART: healthy, worn or failing, and why
  • updatesUpdates waiting, security fixes first, from every package manager and the system
  • updates installInstalls them with the system's own tool, command shown first; never restarts
  • sleepWhen it slept, what woke it, and what keeps it awake now
  • portsWhat is listening, which program and project it is, and stopping it
  • stopStops a program by name or PID, after giving it 10 seconds to save
  • startupWhat starts by itself, Login Items included, and what failed; switch it off and back on
  • checkExit codes and a webhook for monitoring: full disks, failing drives, new SSH keys
  • metricsNumbers for Prometheus
  • logEvery change: what, when, who and how much

Server checks

  • databasesWhat a database keeps beside its data, each database's size and growth, and its own command to fix it
  • sitesEvery nginx, Apache and Caddy site, and what is broken
  • jobsScheduled jobs that failed, didn't run, or lost their output
  • loginsSSH logins, guessing by address, and every key that can log in
  • before afterWhat an upgrade or a deploy changed

Keep a server healthy

  • maintainA plan of updates, logs, safe items, service restarts and a restart when needed, a window, and a report of each run
  • forecastWhen each disk will be full at this rate, and which folder grows fastest
  • servicesFailed services first, with their last log lines, and a restart
  • rebootIs a restart needed and why; restart in 2 minutes, at a time, now, or cancel
  • stats --historyCPU, memory and disk space every 5 minutes, for 30 days

Backups and snapshots

  • backupBackups ByteSweep sets up with restic: add, run, list, restore, check, remove
  • backupsEvery backup found on the machine, whoever set it up, and when it last worked
  • snapshotsTime Machine, restore points, shadow copies, Timeshift, Snapper and ZFS; remove or thin, the newest kept

Privacy and sharing

  • permissionsWhich apps may use the camera, microphone, screen, location and files
  • sharesafeShared folders, sharing services, open ports and who can log in, each with a risk

Servers

  • fleet statusEvery saved server in one table: disk, forecast, updates, problems, maintenance, backups
  • fleet runOne job on many servers, each server's preview first
  • fleet historyWhat ran on which server, for 90 days
  • host tagGroup servers by tag
  • fleetOne table for many servers over SSH, with nothing left installed
  • manageEvery saved server on one screen
  • connectThe full app on a remote server

Move files

  • host folderSave a server or a folder pair once
  • copy-to copy-fromCopy by name, resuming where it stopped
  • syncShows the changes first, then syncs
  • sync-undoBrings back what a sync removed, for 7 days
  • share tunnelLet a server reach folders on your laptop

AI assistants

  • mcpFor Claude Desktop, Claude Code, Cursor and VS Code: looks, and plans you approve
  • mcp configThe line or file to add it to each assistant

Rescue USB

  • rescue-usbDownloads the Rescue USB image and checks its signature
  • rescue-usb writeWrites it to a stick, never to the disk the computer runs from
  • rescue-bootOn the stick: the disks, and Rescue on the one you choose
  • --rootPoints rescue, clean, why and top at another system mounted on this one

Linux only

  • growTakes unused disk space into the partition
  • motdA line at login when something needs attention

Setup

  • updateInstalls the newest signed release of ByteSweep CLI
  • configShows or checks the settings file
  • completionTab completion for bash, zsh, fish and PowerShell

Free. On every machine.

$0 for good

Every command, on every machine you own or look after: laptops, desktops and servers, on any system. No licence, no key, no trial and no account. Use it at home and at work.

Every machine
Install it on your own computer, or on every server you run. Nothing to buy and nothing to activate.
Get the install command
Every system
23 builds: Linux, Mac, Windows, the BSDs, Solaris, illumos and AIX. Releases are signed, so bsweep update only installs what we built.
Want a window?
ByteSweep for Mac, Windows and Linux: the same safety, with a disk map you can click, and your servers on one page.
See the desktop apps

Changes to the system still ask first and need sudo (or Run as administrator), as they always have.

See what fills it

  • Why a disk is full, and when it will be
  • Largest folders, find, what grew
  • Health, live stats and 30 days of history
  • Sleep, permissions and sharing
  • Database, site, job and login checks
  • Snapshots and backups found
  • Monitoring, JSON and fleet reports

Free it safely

  • Clean, with Undo for 7 days
  • Rescue a disk at 100%
  • Clear logs, now or on a schedule
  • Remove snapshots
  • Organize, rename, compress and archive
  • Copy and sync with a server
  • The Rescue USB, for a computer too full to start

Keep it that way

  • A maintenance plan and window
  • Backups ByteSweep sets up
  • Automatic cleanup and alerts
  • Build runners kept clear
  • Many servers from one place
  • Your AI assistant, with plans you approve

Questions.

Which systems does it run on?

macOS 11 and later, Windows 10 and 11, any Linux, FreeBSD, OpenBSD, NetBSD, DragonFly, Solaris, illumos and AIX: 23 combinations of system and processor, including Apple silicon, ARM64, RISC-V and 32-bit. In Android's Termux it can look but not clean.

Which terminals?

Any of them: Terminal, iTerm2, Windows Terminal, PowerShell, the classic Windows console, GNOME Terminal, Konsole, xterm, the Linux console, tmux, screen and PuTTY, locally or over SSH.

How is it different from ByteSweep for Mac or Windows?

Those are windowed apps with many more tools. ByteSweep CLI is one file for the terminal, so it also works on servers with no screen, over SSH, in scripts and in monitoring.

Does it send my data anywhere?

No. No analytics, no account and nothing about your files. It goes online only when you ask: updates come from bytesweep.app when you run bsweep update, and alerts go only to the places you add.

Can I undo a clean?

Files you clean in the app or with bsweep rm wait in Undo for 7 days. They keep using space until then, so on a full disk choose Remove now: --now on the command, or F in the app. It can't be undone, and it always asks first. Cleanups through a system tool, such as journalctl or Docker, can't be undone, and the command is shown first.

Will it touch my databases?

No. ByteSweep never removes a database file, even as administrator: a binary log or WAL file deleted by hand breaks replicas or the database itself. bsweep databases finds what fills the disk and gives the database's own command, such as PURGE BINARY LOGS, with what to check first. With sudo it asks the server through root's own login; it never asks for or keeps a password.

Is it really free?

Yes, every command on every machine, for good, with no trial and no key. You may use it at home and at work, on as many machines as you like. We make ByteSweep for Mac, Windows and Linux, the desktop apps, and that is how we pay for both.

Does it work without internet?

Yes. Everything works offline; only bsweep update, alerts and copying to a server need a network.

Is it safe to let an AI assistant use it?

bsweep mcp runs the same bsweep with a fixed list of words, never a shell and never a command the model wrote. A change comes back as a plan with the exact command; it runs only after your yes, and only if you started it with --allow-changes. It never restarts a machine or uses --now, and every change is in bsweep log.

What does the Rescue USB need?

A USB stick you can erase, and a computer that starts from USB: a PC with UEFI or an older BIOS, or an ARM computer with UEFI, with about 1 GB of memory. For now, turn Secure Boot off in the firmware settings for the rescue, then on again. It reads Linux and Windows (NTFS) disks, encrypted and LVM ones too; Mac disks are only named, so use the Mac's own Recovery.

I bought a ByteSweep CLI licence. What now?

Nothing to do: ByteSweep CLI is free from version 1.0.1, so your machines keep working with or without the key. Run sudo bsweep update to get it.

Terminal output on this page is sample output from real runs.

Type bsweep why.

Free on macOS, Windows, Linux and Unix, on every machine you look after. It looks first, and changes nothing until you say so.

Get the install command Or see the desktop apps