specification

XDG Trash Specification

The XDG Trash Specification is a freedesktop.org standard that defines a common protocol for implementing a trash or recycle bin functionality on Linux and other Unix-like systems. It specifies how deleted files should be moved to a trash directory instead of being permanently erased, allowing users to restore them later. This ensures consistency across different desktop environments and file managers by standardizing the location, structure, and behavior of the trash system.

Also known as: XDG Trash Spec, freedesktop.org Trash Specification, Trash Specification, XDG Trash, Trash Standard
🧊Why learn XDG Trash Specification?

Developers should learn this specification when building or integrating file management applications, desktop environments, or system utilities for Linux/Unix platforms to ensure interoperability and user-friendly file deletion handling. It's crucial for implementing features like undo delete, trash browsing, and secure file removal in compliance with freedesktop.org standards, avoiding platform-specific hacks. Use cases include developing file managers (e.g., Nautilus, Dolphin), backup tools, or system scripts that need to handle deleted files safely.

Compare XDG Trash Specification

Learning Resources

Related Tools

Alternatives to XDG Trash Specification