Skip to main content

Uninstall

Remove the automation first, then the package, then the data. Uninstalling the package does not remove a shell alias or cron entry you installed — those are separate.

1. Remove the automation​

linux-cleanup --uninstall-alias
linux-cleanup --uninstall-cron

Do this before removing the package, while the command still exists. If you have already removed it, see manual removal below.

Verify:

crontab -l | grep -i cleanup # expect no output
grep -rn 'cleanup' ~/.bash_aliases ~/.zshrc 2>/dev/null

2. Remove the package​

npm uninstall -g linux-cleanup

For npx, nothing is installed — the npm cache evicts it on its own. To clear it now:

npm cache clean --force

For a git clone, delete the directory:

rm -rf ~/linux-cleanup
A clone holds its own logs and records

Unlike the npm install paths, a clone keeps output in <clone>/logs/ and <clone>/reports/. Deleting the clone deletes those too. Copy anything you want to keep first. See Output paths.

3. Remove the data​

Logs, session records and feedback bundles live in ~/.linux-cleanup/ and are never removed by uninstalling.

ls -la ~/.linux-cleanup/ # look before deleting
rm -rf ~/.linux-cleanup/

They are small — usually a few megabytes — and they are the only account of what past runs deleted. Keeping them costs nothing; removing them is irreversible like anything else.

If you set LINUX_CLEANUP_DATA_HOME, remove that directory instead, and drop the export from your shell configuration.

4. Remove configuration, if you created any​

rm -f ~/.config/personal-roots.txt ~/.config/project-roots.txt

Only present if you created them. See Environment variables.

If you removed the package first​

Undo both helpers by hand.

Cron:

crontab -e
# delete the line containing linux-cleanup or cleanup.sh

Alias:

grep -n 'cleanup' ~/.bash_aliases ~/.zshrc 2>/dev/null

Remove the matching alias line with your editor, then source the file or open a new terminal.

What is left behind​

Nothing, once the above is done. The tool installs no system service, no daemon, no systemd unit, no /etc entry and no root-owned file. Everything it creates is inside your home directory.

Effects on your system it does not undo — because they are not files it owns:

  • Deleted caches stay deleted. They regenerate as each tool needs them
  • Shell-init blocks added by --doctor stay. They are the correct configuration for runtimes you have installed; remove them by hand if you want them gone

Verify​

command -v linux-cleanup # expect no output
crontab -l | grep -i cleanup # expect no output
ls ~/.linux-cleanup 2>&1 # expect: No such file or directory

Next​