a cross-platform command-line "trash can" utility
Clone or download
Failed to load latest commit information.
docs website:add fontawesome webfonts Nov 11, 2018
m4 m4:remove 5 unnecessary files Aug 26, 2018
man Remove -B option from the Nepali man page Oct 27, 2018
packaging/Slackbuild/rmw migrate wiki info to website, make website live Nov 8, 2018
po write a default config file if one isn't present Nov 6, 2018
src strings_rmw.c:don't let "str" go back further than pos 0. Nov 17, 2018
test config_rmw.c:warn user about invalid or unknown option in config Nov 11, 2018
.gitattributes .gitattributes:detect sh as C [skip ci] Nov 29, 2017
.gitignore .gitignore:add ABOUT-NLS Nov 5, 2018
.travis-before_install.sh travis:fix clang build, add more tests Sep 2, 2018
.travis.yml .travis.yml:disallow failures on osx builds Nov 14, 2018
AUTHORS.md added author to AUTHORS.md and new language available (#163) Jan 14, 2018
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md (#79) Oct 14, 2017
CONTRIBUTING.md migrate wiki info to website, make website live Nov 8, 2018
COPYING change dev version Oct 20, 2016
ChangeLog config_rmw.c:warn user about invalid or unknown option in config Nov 11, 2018
Makefile.am Makefile:copy rmw bin to builddir after make is run Nov 5, 2018
Makefile.in .gitignore:add ABOUT-NLS Nov 5, 2018
NEWS release version 0.4.05 Oct 24, 2018
README.md README.md:suggest "install-strip" for end-users Nov 14, 2018
THANKS Add @shiftkey and http://up-for-grabs.net/ to THANKS file Oct 10, 2016
aclocal.m4 configure and Makefiles:push regenerated files Aug 26, 2018
compile regenerate build files Feb 13, 2018
config.guess regenerate build files Feb 13, 2018
config.in Makefile cleanup Oct 16, 2018
config.rpath [wip] prepare for translation (#107) Nov 19, 2017
config.sub regenerate build files Feb 13, 2018
configure configure.ac:don't use any compiler flags by default Nov 16, 2018
configure.ac configure.ac:don't use any compiler flags by default Nov 16, 2018
depcomp regenerate build files Feb 13, 2018
install-sh regenerate build files Feb 13, 2018
missing regenerate build files Feb 13, 2018
rmwrc remove unused PROTECT feature Oct 26, 2018


Build Status Build Status

rmw v0.4.06 (development)

rmw (ReMove to Waste) is a cross-platform command-line "trash can" utility. It can send files to your "Desktop" trash, or a completely separate folder; restore files and append a unique string to the filenames so they won't be overwritten (duplication protection).

Web site: https://remove-to-waste.info/

This is the README for the development version of rmw. It may mention features that aren't included in the last release, or differ in other ways. The README from the last release is at https://github.com/theimpossibleastronaut/rmw/blob/v0.4.05/README.md

rmw usage output

More Screenshots

Anyone interested in this project is welcome to join the Matrix chat room.

Required libraries


If you are building from source, you will need the libncurses(5 or 6)-dev package from your operating system distribution.


With superuser privileges:

Use ../configure --help to view available compile-time options.

mkdir build
cd build
make install-strip

As a normal user:

mkdir build
cd build
../configure --prefix=$HOME/usr
make install-strip

rmw will be installed to $HOME/usr/bin and the configuration file will be copied to $HOME/usr/etc

Pre-built binary packages

Packages for some operating systems are available on the Downloads page

Using Homebrew on Mac OS X

Add a tap and install rmw:

Uninstall / Cleaning up

  • make uninstall (uninstalls the program if installed with 'make install`)
  • make distclean (removes files in the build directory created by configure and 'make')


== First-time use ==

If you installed rmw as a normal user, this next step can be skipped.

After rmw is installed, create the user configuration directory by
typing 'rmw' and hitting enter. Afterward, copy rmwrc to
$HOME/.config/rmw and rename it to 'config':

    cd ~/.config/rmw
    ~/.config/rmw$ cp rmwrc config

Then edit the file to suit your needs.

rmw will automatically create a 'lastpurge' and 'lastrmw' in that same

== Configuration File ==

Documentation explaining the configuration can be found in rmwrc.

Waste folders will be created automatically. (e.g. if '$HOME/trash.rmw'
is listed in the config file, these 3 directories will be created:

If one of the WASTE folders is on removable media, then the user has the
option of appending ',removable' (details in etc/rmwrc).

== Features and Options ==

Usage: rmw [OPTION]... FILE...
ReMove the FILE(s) to a WASTE directory listed in configuration file

   or: rmw -s
   or: rmw -u
   or: rmw -z FILE...
Restore FILE(s) from a WASTE directory

-h, --help
-t, --translate           display a translation of the configuration file
-c, --config filename     use an alternate configuration
-l, --list                list waste directories
-g, --purge               run purge even if it's been run today
-o, --orphaned            check for orphaned files (maintenance)
-f, --force               allow purge to run
-v, --verbose             increase output messages
-w, --warranty            display warranty
-V, --version             display version and license information

	===] Restoring [===

-z, --restore <wildcard filename(s) pattern>
-s, --select              select files from list to restore
-u, --undo-last           undo last ReMove

== Purging ==

If purging is 'on', rmw will permanently delete files from the folders
specified in the configuration file after 'x' number of days. Purging can be
disabled by using 'purge_after = 0' in configuration file. rmw will only check
once per day if it's time to purge (use -g to check more often).

Purge requires -f (--force) to run.

To skip that requirement, add the line


to your configuration file.

The day of the last purge is stored in $HOME/config/rmw/lastpurge

== Empty the Trash ==

To empty the trash completely, rmw can use the environmental variable
RMWTRASH=empty rmw -fg

== -z option ==

To restore a file, or multiple files, specify the path to them in in the
<WASTE>/files folder (wildcards ok).
e.g. 'rmw -z ~/.local/share/Trash/files/foo*'

Files can also be restored using only the basename, from within any directory.
NOTE: That feature will not process wildcards unless the user is in a
<WASTE>/files folder and the filespec actually exists in the present working

== -t, --translate ==

If a translation of the configuration file is available in your native
language is available, it will be displayed.

(If you would be interested in adding a translation, please visit

== -f, --force ==
rmw will normally refuse to purge directories if they contain non-writable
subdirectories. You can use -f 2 times if you ever see a message that tells
you "permission denied; directory still contains files" (e.g. rwm -gff).