LaunchKit · 2026
Back to Skills

trash-cli

Use trash-cli to safely delete files by moving them to the system trash instead of permanently removing them.

0
288 downloads
by @xlionjuan

Setup & Installation

openclaw skills install @xlionjuan/trash-cli

Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:

npx clawhub install trash-cli

Version History

v1.0.5Feb 28, 2026 - Version note by skill developer:

* Enhanced metadata format* Removed homepage (not directly related to this project)

What This Skill Does

trash-cli is a command-line interface to the freedesktop.org trashcan. It moves files to the system trash instead of permanently deleting them, recording the original path, deletion date, and permissions. The same trashcan is used by KDE, GNOME, and XFCE.

Unlike rm, deleted files remain recoverable with full metadata, so mistakes during file management don't result in permanent data loss.

When to use it

  • Recovering a config file deleted by mistake during cleanup
  • Safely removing build artifacts without risking permanent loss
  • Searching trashed files by name before deciding to restore or purge
  • Auto-emptying trash files older than N days in a cron job
  • Replacing dangerous rm calls in interactive shell sessions

Example Workflow

Here's how your AI assistant might use this skill in practice.

INPUT

User asks: I accidentally trashed a config file, how do I get it back?

AGENT
  1. 1Run trash-list to display all trashed files with deletion dates and original paths
  2. 2Pipe output through grep to locate the specific config file
  3. 3Run trash-restore to enter interactive mode showing numbered file list
  4. 4Enter the file's number to restore it to its original location
OUTPUT

Config file restored to its original path on disk