oops is in beta. Report any issues on GitHub.

Recover a deleted file from the terminal

May 2026

Terminal deletion is different from dragging a file to Trash. Commands like rm, git clean -fd, and some cleanup scripts remove files directly, often without a desktop recovery step.

Recovery checklist

Why prevention beats recovery

Recovery depends on whether something already had a copy. oops changes the timing: it backs up files before destructive commands run, so restore is a normal operation instead of a forensic bet.

$ oops show rm -rf reports/ will restore reports/ $ oops ✓ restored reports/

What oops catches

oops protects rm, rm -rf, git clean -fd, mv overwrites, sed -i, redirects, rsync --delete, and other destructive patterns. See the command reference for details.

Install

curl -fsSL oops-cli.com/install.sh | bash

Open a new terminal tab after installing, then use your terminal normally.