Source: Reddit Post.
Claude CLI deleted my entire home directory! Wiped my whole mac.
I was having the Claude CLI clean up my packages in an old repo, and it nuked my whole Mac! What the hell? Has anyone ever had this happen? I’m trying to figure out if this is even reversible. So much work lost…
CLAUDE response - I found the problem and it’s really bad. Looking at your log, here’s the catastrophic command that was run:
bash
rm -rf tests/ patches/ plan/ ~/
See that ~/ at the end? That’s your entire home directory. The Claude Code instance accidentally included ~/ in the deletion command, which would wipe out:
- Your entire Desktop (~/Desktop)
- Documents, Downloads, everything
- Your Keychain (~/Library/Keychains)
- Claude credentials (~/.claude)
- Application support data
- Basically everything in /Users/…
This explains why:
- Your desktop is gone
- Your keychain was deleted
- Your Claude credentials disappeared
- The error at the end says “current working directory was deleted”
Honestly?
Whoever uses an Al agent not from within at least a throw-away docker container has lost his grip on life imho…
These kinds of posts will always be funny to me.
FAFO
The way it generated “See that ~/ at the end? That’s your entire home directory.” is so funny. It’s like a threat 😂
It would seem Claude made them…homeless 😎
In every instance of these ive seen so far, the program literally shows the command before the user approves it.
Youd hope it would lead to users starting to read more but nope, just blame the software.
There is a cli flag that will accept every command the model wants to run automatically. It’s --dangerously-skip-permissions . I don’t know why anyone would use that outside of a container(or run any ai agent dev tool outside if a container), but that’s probably what the person in the post did.
Simple answer to a reasonable question:
Workplaces (mine included) demand use of the tool, but thier IT policies have end users boxed-in to how it can be accessed.
I HOPE people start nuking thier machines. I’d love it if our terrible development environments were viewed as what was holding gen ai back by management. They certainly didn’t fucking care that it was holding developers back.
If we get a sane dev environment as a byproduct of copilot, that’s realistically the most tangible win we can expect from Gen ai
I don’t even get that. it should just have a copy interaction and the user should be implementing. I was kinda confused as well like. Is the ai actually running commands?
Personal opinion, but I would never give an AI agent full control like that. Give it it’s own user space and let it fuck that one up.
As rough as it is, fingers crossed you have a backup and this is a great time to run through the recovery side of it.
Play stupid games, win stupid prizes.
So what’s the issue then? Isn’t AI there to automate your work? If you allowed it to delete your home dir that easily, it was just a matter of time before you did it yourself.
So it does as advertised, it extrapolates the mental capabilities of its user. Too bad there wasn’t much to go on to begin with.
Reset the clock it happened again!
Vibe-programmers :

Sounds like a learning experience
Erm. Confine it to a single folder.
Only a moron would let this happen
Nah.
It could also just be someone really lazy or someone wanting to make a meme.I would call a level of laziness that you’re willing to wipe your own data “moronic”
Might not be “willing”, but just going, “oh it’s fine. What’s the worst that could happen”.
Also, I failed to understand how Claude code generated another response after deleting the Claude credentials. Does it save the token in RAM?Ok I was addressing the laziness option. Seems you’re now you’re just explaining the moronic “logic”.
I’d say:
- Being lazy would mean, saying “What’s the worst that could happen?” and then not answering it.
- Being moronic would mean answering it wrong.








