#StackBounty: #filesystem #rm #tmp Accidentally moved `/tmp` – replacements won't persist

Bounty: 50

I did sudo mv /tmp /var/lib/apt/lists not realizing that it would move the whole folder and not just the contents.

I since do (as suggested in Accidentally deleted tmp folder)

sudo mkdir /tmp
sudo chmod 1777 /tmp

on startup, but after a while it disappears again.
What can I do? how can I debug this?

It seems that /tmp is renamed to /snapshot.0 (or with a higher index if other snapshots already exist).

Restart does not solve it. But shutting down without a /tmp isn’t a problem either, on startup a new /tmp is there.
However within 4 minutes it is renamed to another snapshot.

I currently execute sudo mv /snapshot.0 /tmp whenever /tmp disappears which I realize whenever autocomplete in terminal stops working or commands like apt-get rely on /tmp existing.

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.