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.

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

1
2
nircmd moverecyclebin *.tmp

macos

do this manually:

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

trash

rmtrash in nightproductions’s cli tools

Comments