a safe-remove utility for the command line https://remove-to-waste.info/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
andy5995 79bb3e89c0
doc: fix formatting on code-testing page
1 week ago
.github/workflows use ignore patters to skip some actions ci tests 1 month ago
build-aux remove unneeded m4 file 1 month ago
docs doc: fix formatting on code-testing page 1 week ago
man add extra gcc options (#286) 6 months ago
packaging update some Debian packaging files [skip ci] 7 months ago
po remove error code array 1 month ago
src reduce output when purge is used with '-v' or '-vv' 1 month ago
test add and use function to check for . dir names 1 month ago
.editorconfig add .editorconfig (closes #259) [skip ci] 1 year ago
.gitattributes add m4 2 years ago
.gitignore .gitignore:remove external/ 1 year ago
.travis.yml .travis.yml: add focal, test for release flag, cleanup (fixes #287) 4 months ago
ABOUT-NLS add ABOUT-NLS (more of fixing make distcheck #216) 1 year ago
AUTHORS.md Adding Hindi translation 9 months ago
CODE_OF_CONDUCT.md COC:review and update [skip ci] 1 year ago
CONTRIBUTING.md doc:adds GitHub Discussions link 1 month ago
COPYING change dev version 4 years ago
ChangeLog restore broken symbolic links and add test (fixes #292) 1 month ago
Makefile.am use different data dirs, rename and data files 1 year ago
Makefile.in add extra gcc options (#286) 6 months ago
README.md doc:remove deprecated "force" info 1 month ago
ReleaseNotes release 0.7.05 7 months ago
THANKS Add @shiftkey and http://up-for-grabs.net/ to THANKS file 4 years ago
aclocal.m4 add extra gcc options (#286) 6 months ago
config.in libs no longer an option, makefile rules removed 1 year ago
configure prefix tests with 'test_' 1 month ago
configure.ac prefix tests with 'test_' 1 month ago
rmwrc.example use different data dirs, rename and data files 1 year ago




rmw (ReMove to Waste) is a safe-remove utility for the command line. Its goal is to conform to the FreeDesktop.org Trash specification and therefore be compatible with KDE, GNOME, XFCE, and others. Desktop integration is optional however, and by default, rmw will only use a waste folder separated from your desktop trash. One of its unique features is the ability to purge files from your Waste/Trash directories after x number of days.

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

Build Status

  • Build Status
  • CodeQL
  • Build Status


rmw usage output

More Screenshots

Contact / Support

Required libraries

  • libncursesw (ncurses-devel on some systems, such as CentOS)
  • gettext (or use --disable-nls if you only need English language support)

If you are building from source, you will need the libncursesw(5 or 6)-dev package from your operating system distribution. On some systems just the ncurses packages is needed, and it's often already installed.


As a normal user:

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

mkdir build
cd build

Installing without superuser privileges

If you would like to install rmw without superuser privileges, use a prefix that you have write access to. Example:

../configure --prefix=$HOME/usr
make install

The rmw binary will be installed to $HOME/usr/bin and documentation to $HOME/usr/doc.

If configure fails

On OSX, ncursesw isn't provided by default but can be installed using brew install ncurses. Then precede ./configure with PKG_CONFIG_PATH="/usr/local/opt/ncurses/lib/pkgconfig" Example:

PKG_CONFIG_PATH="/usr/local/opt/ncurses/lib/pkgconfig" ../configure

If you can't use brew, or install libncursesw or libmenuw some other way, rmw will use ncurses but you may experience this minor bug.

Note: rmw was built on Windows 2 years ago using Cygwin but it didn't use the proper directories. We have no Windows developers working on this project and are hoping that some will join soon!. As stated in the description, the goal of this project is a "cross-platform" utility; so getting rmw to work on Windows is still on the TODO list.

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 ==

After rmw is installed, running `rmw` will create a configuration file
(rmwrc) in $HOME/.config (or $XDG_CONFIG_HOME). Edit the file as

== Configuration File ==

Documentation explaining the configuration can be found in your config

Waste folders will be created automatically; e.g. if '$HOME/.local/share/Waste'
is uncommented 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'.

If a folder has ',removable' appended to it, rmw will not try to create
it; it must be initially created manually. If  the folder exists when
rmw is run, it will be used; if not, it will be skipped. Once you
create "example_waste", rmw will automatically create
example_waste/info and example_waste/files

    e.g.: WASTE=/mnt/sda10000/example_waste, removable

== 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
-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
-e, --empty               completely empty (purge) all waste folders
-r, -R, --recursive       option used for compatibility with rm
                          (recursive operation is enabled by default)
-v, --verbose             increase output messages
-w, --warranty            display warranty
-V, --version             display version and license information

    ===] Restoring [===

-z, --restore <wildcard filename(s) pattern> (e.g. ~/.local/share/Waste/files/foo*)
-s, --select              select files from list to restore
-u, --undo-last           undo last ReMove
-m, --most-recent-list    list most recently rmw'ed files

== 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).

The time of the last automatic purge check is stored in `purge-time`,
located in $HOME/.local/share/rmw (or $XDG_DATA_HOME/rmw).

== -e, --empty ==

Completely empty (purge) all waste folders

== -u, --undo ==

Restores files that were last rmw'ed. No arguments for `-u` are
necessary. The list of files that were last rmw'ed is stored in `mrl`, located in
$HOME/.local/share/rmw (or $XDG_DATA_HOME/rmw).

== -z, --restore ==

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

== -f, --force ==

rmw will 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).