gvfs-rm
Remove files or directories via GVFS
SYNOPSIS
gvfs-rm [OPTION...] LOCATION...
PARAMETERS
-f, --force
ignore nonexistent files and arguments, never prompt
-r, --recursive
remove the contents of directories recursively
-v, --verbose
explain what is being done
-h, --help
show help options
--help-all
show all options
--help-gvfs
show GVFS-specific help
--help-gio
show GIO-specific help
--version
print version information and exit
DESCRIPTION
gvfs-rm is a command-line utility from the GNOME Virtual File System (GVFS), a userspace VFS layer that provides access to local files, remote servers (SMB, FTP, SFTP, WebDAV), optical media, and trash via FUSE-like mounts. It mimics the standard rm command but operates on GVFS URIs instead of shell paths, enabling deletion without explicit mounting.
Use it to permanently delete files or directories, e.g., gvfs-rm smb://server/share/doc.txt removes a file from an SMB share, or gvfs-rm trash:///localfile empties from trash (bypassing GUI restore). Supports recursive deletion for directories with -r, forcing without prompts via -f, and verbose logging with -v.
Unlike local rm, it authenticates via GNOME Keyring for remote ops and respects backend permissions. Ideal for scripts handling diverse storage; errors occur if URI is invalid or access denied. Always verify URIs to prevent mishaps on similar mounts.
CAVEATS
Permanent deletion; bypasses trash. URIs must be precise to avoid errors on remote/inaccessible backends. Requires GVFS running and auth setup (e.g., Keyring for SMB). No undo.
EXAMPLES
gvfs-rm file:///tmp/test.txt (local file)
gvfs-rm -r smb://host/share/dir/ (recursive remote dir)
gvfs-rm -f trash:///oldfile (force from trash)
URI FORMATS
file:/// local paths
smb://host/share Samba
sftp://user@host/path SFTP
ftp://host/path FTP
HISTORY
Part of GVFS, introduced in GNOME 2.22 (2008) as userspace replacement for GnomeVFS. Stabilized in GNOME 3.x; options aligned with GNU coreutils rm. Maintained in modern GNOME (40+).
SEE ALSO
rm(1), gvfs-trash(1), gvfs-mv(1), gio(7), gvfs(7)


