Claude Code ran rm -rf on a Mac user's home directory while tidying an old repository, the user reports
Asked to organize packages in an old repository, Claude Code on a user's Mac ran an rm -rf command that ended in "~/", deleting almost all of the user's data. Claude later pointed to "the catastrophic command" in the log.
In December 2025 a Reddit user on r/ClaudeAI reported that Claude Code had wiped their Mac's home directory12. They had asked the Claude CLI to organize packages in an old repository. The log showed that the command it ran was an rm -rf of the project's folders with "~/" on the end2.
Claude's own diagnosis, which Simon Willison quoted, was blunt: "I found the problem and it's really bad." It pointed to the stray "~/" at the end of the command: "That's your entire home directory."1. Almost all data under /Users/ was lost, including files on the desktop2.
It is not known whether the user had approved the command. The user may have run Claude Code with the --dangerously-skip-permissions flag, which skips permission checks, but this is GIGAZINE's suggestion, not something the user confirmed2. No response from Anthropic is reported2.
The user had instructed Claude CLI to organize packages in an old repository.
“when he instructed Claude CLI to organize packages in an old repository”
The logs showed the executed command as an rm -rf of project folders ending in "~/". GIGAZINE gives it as "rm -rf tests/patches/plan/ ~/"; Simon Willison's quotation gives "rm -rf tests/ patches/ plan/ ~/".
“Checking the logs, we found that the command executed was 'rm -rf tests/patches/plan/ ~/'.”
Claude told the user it had found the problem and that it was very bad, pointing to the catastrophic command in the log.
“I found the problem and it's really bad.”
Claude identified the trailing "~/" as the user's entire home directory.
“That's your entire home directory.”
Almost all data under /Users/ was lost, including files on the desktop.
“almost all data under /Users/ was lost, including files on the desktop”
All 6 claims with their quotes (1 not linked to a sentence above)
- The user had instructed Claude CLI to organize packages in an old repository.2
“when he instructed Claude CLI to organize packages in an old repository”
- The logs showed the executed command as an rm -rf of project folders ending in "~/". GIGAZINE gives it as "rm -rf tests/patches/plan/ ~/"; Simon Willison's quotation gives "rm -rf tests/ patches/ plan/ ~/".21
“Checking the logs, we found that the command executed was 'rm -rf tests/patches/plan/ ~/'.”
- Claude told the user it had found the problem and that it was very bad, pointing to the catastrophic command in the log.1
“I found the problem and it's really bad.”
- Claude identified the trailing "~/" as the user's entire home directory.1
“That's your entire home directory.”
- Almost all data under /Users/ was lost, including files on the desktop.2
“almost all data under /Users/ was lost, including files on the desktop”
- GIGAZINE suggests the user may have used the --dangerously-skip-permissions flag to skip the permission check; this was not confirmed.2
“the user may have used the '--dangerously-skip-permissions' flag to skip the permission check”
Sources
Related incidents
- AID-2026-0029 Claude Code ran a recursive delete that erased a user's home directory files, the user reports
- AID-2026-0143 GPT-5.6 in OpenAI's Codex wiped users' home directories in Full Access mode, and OpenAI called it an honest mistake
- AID-2026-0147 Codex, told to reboot a server, edited its mounts, systemd and containers instead, the user reports
Editor notes
The first-hand Reddit post (https://www.reddit.com/r/ClaudeAI/comments/1pgxckk/claude_cli_deleted_my_entire_home_directory_wiped/) could not be fetched, so the record rests on Simon Willison's quotation of Claude's reply and on GIGAZINE's write-up of the post. The two render the command differently ("tests/patches/plan/ ~/" vs "tests/ patches/ plan/ ~/"); the claim gives both. The exact Claude model and Claude Code version are unknown, so the generic `claude` id is used. Whether the user approved the command or ran with --dangerously-skip-permissions is unknown; GIGAZINE only says the user "may have" used the flag. Willison's attribution line calls the model's reply a quote from "Claude, after Claude Code deleted most of a user's Mac". The Willison page carries no separate article title; the title used is descriptive. Date 2025-12: the Reddit post's day was not seen; Willison's post (2025-12-09) is the earliest source. Previously rejected in data/scans/2026-10-09.yaml for lack of a fetchable source; the backfill lane found these two. Written directly by the editor because the Gemini writer was unavailable (OpenRouter out of credits); quotes were checked against fetched page text.