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:pluginUsing Oh My Zsh
Clone the repo into your custom plugins directory:
git clone https://github.com/bepisdev/zshclean ~/.oh-my-zsh/custom/plugins/zshcleanThen add zshclean to your plugins array in .zshrc:
plugins=(... zshclean)Using antigen
Add the following to your .zshrc:
antigen bundle bepisdev/zshcleanThen reload your shell or run:
antigen applyUsing zinit
Add this to your .zshrc:
zinit light bepisdev/zshcleanAfter installation, simply run:
zshcleanThis 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