Remove file(s).


> rm ...rest --trash --permanent --recursive --force --verbose --interactive


  • ...rest: the file path(s) to remove
  • --trash: use the platform's recycle bin instead of permanently deleting
  • --permanent: don't use recycle bin, delete permanently
  • --recursive: delete subdirectories recursively
  • --force: suppress error when no file
  • --verbose: make rm to be verbose, showing files been deleted
  • --interactive: ask user to confirm action


Delete or move a file to the system trash (depending on 'rm_always_trash' config option)

> rm file.txt

Move a file to the system trash

> rm --trash file.txt

Delete a file permanently

> rm --permanent file.txt

Delete a file, and suppress errors if no file is found

> rm --force file.txt