Create your own list to share your favorite apps with friends
Move files and directories to the trash
Created by Sindre Sorhus
Works on macOS, Linux, and Windows.
In contrast to fs.unlink, del, and rimraf which permanently delete files, this only moves them to the trash, which is much safer and reversible.
But I can do the same thing with mv
Not really. The mv command isn't cross-platform and moving to trash is not just about moving the file to a "trash" directory. On all OSes you'll run into file conflicts. The user won't easily be able to restore the file. It won't work on an external drive. The trash directory location varies between Windows versions. For Linux, there's a whole spec you need to follow. On macOS, you'll lose the Put back feature.... More Info »
Official Website GitHub
Command line interface
Add a feature
OS & Utilities
command-line-interface delete-directories delete-files move-to-trash
Trash (sometimes referred to as Trash CLI) was added by POX in
Mar 2019 and the latest update was made in
Mar 2019. The list of alternatives was updated Jan 1 There is a history of all activites on
Trash in our Activity Log.
It's possible to update the information on Trash or report it as discontinued, duplicated or spam.
Maybe you want to be the first to submit a
comment about Trash? Just click the button up to your right!