Recycle Bin, Trash Can Cli Alternative

macos
terminal
trash
cli
trash-cli
cmdutils
cmd-recycle
Learn how to empty the trash on MacOS using a terminal and discover an alternative cross-platform CLI tool called ‘trash-cli’ for managing your personal recycle bin. Additionally, explore other related tools such as cmdutils, cmd-recycle, and nircmd for Windows.
Published

August 19, 2023


trash-cli (with python binding) may work cross-platform, but manage its own recycle bin instead of the system if using windows or macos.

empty-trash-cli

windows

cmdutils which has recycle and bin commands

cmd-recycle

nircmd

nircmd moverecyclebin *.tmp

macos

do this manually:

# i don't trust this.
#rm -rf ~/.Trash/*
osascript -e 'tell app "Finder" to empty'

trash

rmtrash in nightproductions’s cli tools