<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/the-steam-bug-that-deleted-your-entire-home-directory-jvtbndzcv" -->

---
title: The Steam Bug That Deleted Your Entire Home Directory
description: In 2015, a bug in Steam&#x27;s installation script caused it to recursively delete a user&#x27;s entire home directory and connected drives. The culprit was an `rm -rf...
canonical: https://daily.dev/posts/the-steam-bug-that-deleted-your-entire-home-directory-jvtbndzcv
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: The Steam Bug That Deleted Your Entire Home Directory | daily.dev
og:description: In 2015, a bug in Steam&#x27;s installation script caused it to recursively delete a user&#x27;s entire home directory and connected drives. The culprit was an `rm -rf...
og:url: https://daily.dev/posts/the-steam-bug-that-deleted-your-entire-home-directory-jvtbndzcv
og:image: https://api.daily.dev/og/posts/JvtbNDZcv.png
og:image:alt: The Steam Bug That Deleted Your Entire Home Directory
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# The Steam Bug That Deleted Your Entire Home Directory

**[Coding with Lewis](https://daily.dev/sources/codingwithlewis)** · 1 min read · 30 upvotes · 3 comments

## Summary

In 2015, a bug in Steam's installation script caused it to recursively delete a user's entire home directory and connected drives. The culprit was an `rm -rf $STEAMROOT` command that defaulted to `rm -rf /` when the STEAMROOT variable was empty — effectively wiping everything from the root directory. The bug was triggered when a user moved their Steam folder and symlinked it back, causing Steam to attempt a reinstall. It was eventually fixed with a simple code change, but the incident serves as a cautionary tale about dangerous shell scripting patterns in widely-used software.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=C9pUJya5aZc>

## Questions this post answers

### Why did Steam on Linux delete a user's entire home directory back in 2015?

Steam's uninstall logic ran the command 'rm -rf steamroot' to clear its installation folder, but when the steam root variable was empty, the command silently fell back to 'rm -rf /', recursively deleting every file the user owned starting from the root directory. This happened to a user named Caven after he moved his Steam folder to another drive and symlinked it back, causing Steam to think it needed to reinstall. It wiped his files plus a 3TB external backup drive before Valve patched it with a one-line fix.

_Shell script bugs like this show why developers double-check every rm -rf path variable before shipping._

## Community discussion

Top comments from developers on daily.dev.

**@starfallcodes** · 4 upvotes

> safe code they said. My drive won't be lobotomised they said.

**@codechini** · 1 upvotes

> What can, go wrong will, go wrong.

**@sam7work** · 1 upvotes

> what people don't fully understand, it that all the testing, reviewing and linting is still a best effort case, something can still get through , unforeseen combination of events can cause the software to behave in unforeseen ways , even causing havoc , this is a 2015 event , and yes, those are prehistoric times , but these silly bugs do exist , and will likely remain in existence for a very long time to come

## Similar posts on daily.dev

- [Coding Agent Horror Stories: The rm -rf ~/ Incident](https://daily.dev/posts/coding-agent-horror-stories-the-rm--rf-incident-azeyqv2zz) · Docker · 1 upvotes · 1 comments
- [Suicide Linux @ Things Of Interest](https://daily.dev/posts/suicide-linux-things-of-interest-diizyxulk) · Hacker News · 0 upvotes · 0 comments

---

Tags: [#security](https://daily.dev/tags/security), [#linux](https://daily.dev/tags/linux), [#shell](https://daily.dev/tags/shell), [#steam](https://daily.dev/tags/steam)

[View this post on daily.dev](https://daily.dev/posts/the-steam-bug-that-deleted-your-entire-home-directory-jvtbndzcv)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"The Steam Bug That Deleted Your Entire Home Directory","url":"https://daily.dev/posts/the-steam-bug-that-deleted-your-entire-home-directory-jvtbndzcv","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/the-steam-bug-that-deleted-your-entire-home-directory-jvtbndzcv"},"datePublished":"2026-07-08T16:36:01.199Z","dateModified":"2026-09-13T19:14:01.966Z","description":"In 2015, a bug in Steam's installation script caused it to recursively delete a user's entire home directory and connected drives. The culprit was an `rm -rf...","image":"https://i.ytimg.com/vi/C9pUJya5aZc/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/C9pUJya5aZc/sddefault.jpg","isAccessibleForFree":true,"articleSection":"Coding with Lewis","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Coding with Lewis","logo":"https://media.daily.dev/image/upload/s--St-eJIdL--/f_auto/v1728073102/logos/codingwithlewis","url":"https://daily.dev/sources/codingwithlewis"},"commentCount":3,"discussionUrl":"https://daily.dev/posts/the-steam-bug-that-deleted-your-entire-home-directory-jvtbndzcv","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":30},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":3}],"keywords":"security,linux,shell,steam","timeRequired":"PT1M","video":{"@type":"VideoObject","name":"The Steam Bug That Deleted Your Entire Home Directory","description":"In 2015, a bug in Steam's installation script caused it to recursively delete a user's entire home directory and connected drives. The culprit was an `rm -rf...","thumbnailUrl":"https://i.ytimg.com/vi/C9pUJya5aZc/sddefault.jpg","uploadDate":"2026-07-08T16:36:01.199Z","duration":"PT1M","url":"https://api.daily.dev/r/JvtbNDZcv","embedUrl":"https://www.youtube.com/embed/C9pUJya5aZc"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Coding with Lewis","item":"https://daily.dev/sources/codingwithlewis"},{"@type":"ListItem","position":3,"name":"The Steam Bug That Deleted Your Entire Home Directory"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/the-steam-bug-that-deleted-your-entire-home-directory-jvtbndzcv","comment":[{"@type":"Comment","text":"safe code they said. My drive won’t be lobotomised they said.","datePublished":"2026-07-09T07:57:15.819Z","url":"https://daily.dev/posts/JvtbNDZcv#c-p0VXofD9J","author":{"@type":"Person","name":"Starfall :D","url":"https://daily.dev/starfallcodes","image":"https://media.daily.dev/image/upload/s--4xoTqFbk--/f_auto/v1786806197/avatars/avatar_ecPDW57nUVRidLxwsxruz?_a=BAMAMicg0"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4}},{"@type":"Comment","text":"What can, go wrong will, go wrong.","datePublished":"2026-07-10T03:34:59.198Z","url":"https://daily.dev/posts/JvtbNDZcv#c-a8cmrjndk","author":{"@type":"Person","name":"Chinmay","url":"https://daily.dev/codechini","image":"https://lh3.googleusercontent.com/a/ACg8ocIH2WsF8sgGFUn2cqwWEP7lShdb0sJtMm77hIQNvoUXN83IWMIo=s96-c"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"what people don’t fully understand, it that all the testing, reviewing and linting is still a best effort case, something can still get through , unforeseen combination of events can cause the software to behave in unforeseen ways , even causing havoc , this is a 2015 event , and yes, those are prehistoric times , but these silly bugs do exist , and will likely remain in existence for a very long time to come","datePublished":"2026-07-09T14:39:57.784Z","url":"https://daily.dev/posts/JvtbNDZcv#c-I2ibcFNTA","author":{"@type":"Person","name":"Sam","url":"https://daily.dev/sam7work","image":"https://lh3.googleusercontent.com/a/ACg8ocJGz1oRsDNA5jHaL8S_Dm_S69r5oVuMT_253w26IC3wacnjq1U=s96-c"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/the-steam-bug-that-deleted-your-entire-home-directory-jvtbndzcv#faq","mainEntity":[{"@type":"Question","name":"Why did Steam on Linux delete a user's entire home directory back in 2015?","acceptedAnswer":{"@type":"Answer","text":"Steam's uninstall logic ran the command 'rm -rf steamroot' to clear its installation folder, but when the steam root variable was empty, the command silently fell back to 'rm -rf /', recursively deleting every file the user owned starting from the root directory. This happened to a user named Caven after he moved his Steam folder to another drive and symlinked it back, causing Steam to think it needed to reinstall. It wiped his files plus a 3TB external backup drive before Valve patched it with a one-line fix. Shell script bugs like this show why developers double-check every rm -rf path variable before shipping."}}]}
```

