zshclean is a Zsh plugin designed to help you keep your $HOME
directory tidy by removing temporary files and common system clutter. It supports both macOS and Linux, safely deleting common cache, history, swap, and log files with a single command.
- Cleans up Zsh, Vim, Neovim, and system temp files in your home directory
- Supports both macOS and Linux (auto-detects OS)
- Handles both files and directories, with support for wildcards/globs
- Simple usage: just run
zshclean
You can use zshclean with popular Zsh plugin managers or by sourcing the plugin manually.
Using zplug
Add this to your .zshrc
:
zplug "bepisdev/zshclean", from:github, as:plugin
Using Oh My Zsh
Clone the repo into your custom plugins directory:
git clone https://github.com/bepisdev/zshclean ~/.oh-my-zsh/custom/plugins/zshclean
Then add zshclean
to your plugins
array in .zshrc
:
plugins=(... zshclean)
Using antigen
Add the following to your .zshrc
:
antigen bundle bepisdev/zshclean
Then reload your shell or run:
antigen apply
Using zinit
Add this to your .zshrc
:
zinit light bepisdev/zshclean
After installation, simply run:
zshclean
This will delete common temporary files and directories from your $HOME
directory according to your OS.
- Flags to inspect target files/directories
- Functions to configure and modify the target file lists