I accidentally untarred archive intended to be extracted in root directory, which among others included some files for /etc directory.
I went on to rm -rv ~/etc, but I quickly typed rm -rv /etc instead, and hit enter, while using a root account.
Reusing names of critical system directories in subdirectories in your home dir.

I agree with this take, don’t wanna blame the victim but there’s a lesson to be learned.
[OP] accidentally untarred archive intended to be extracted in root directory, which among others included some files for /etc directory.
I dunno, ~/bin is a fairly common thing in my experience, not that it ends up containing many actual binaries. (The system started it, miss, honest. A quarter of the things in my system’s /bin are text based.)
~/etc is seriously weird though. Never seen that before. On Debians, most of the user copies of things in /etc usually end up under ~/.local/ or at ~/.filenamehere
I think the home directory version of etc is ~/.config as per xdg.
It should be ~/.local/bin
~/bin is the old-school location from before .local became a thing, and some of us have stuck to that ancient habit.
Oh, my! Perfect use of that scene. I don’t always lol, when I say lol. But I lol’ed at this for real.
I’ll provide some cover. This is my current home directory:
bin/ bmp/ cam/ doc/ eot/ hhc/ img/ iso/ mix/ mku/ mod/ mtv/ mus/ pkg/ run/ src/ tmp/ vid/ zim/. It’s your home directory, enjoy it however you like.So, you don’t do backups of /etc? Or parts of it?
I have those tars dir ssh, pam, and portage for Gentoo systems. Quickset way to set stuff up.
And before you start whining about ansible or puppet or what, I need those maybe 3-4 times a year to set up a temporary hardened system.
But may, just maybe, don’t assume everyone is a fucking moron or has no idea.
Edit Or just read what op did, I think that is pretty much the same
But may, just maybe, don’t assume everyone is a fucking moron or has no idea.
Well, OP didn’t say they used Arch, btw so it’s safe to assume.
(I hate that this needs a /s)
HAH rookie, I once forgot the . before the ./
Nvidia once did it in their install script
DId you try CRTL-Z?
Great! Now you can enjoy that freshly assembled directory feeling, knowing that now you only have the configs in there that you need.
Is there any reason to use a root account? If you had used sudo for each privilege needing command in stead it would have stopped you.
Is there any reason to use a root account?
if you just borked your /etc and need to rebuild because you don’t have sudo anymore
I hand-edited sudoers.conf day one on the job without using visudo
So in one day, I learnd both how to move a volume from one AWS VM and that there’s no good reason not to use visudo.
Would it? I think it would have just let you do it.
Whelp, time to restore the latest snapshot.
Your first mistake was attempting to unarchive to / in the first place. Like WTF. Why would this EVER be a sane idea?
I don’t know if it should be a bad thing. Inside the tar archive the configs were already organized into their respective dirctories, this way with
--preserve-permissions --overwriteI could just quickly add the desired versions of configs.
Some examples of contents:-rw-r--r-- root/root 2201 2026-02-18 08:08 etc/pam.d/sshd -rw-r--r-- root/root 399 2026-02-17 23:22 etc/pam.d/sudo -rw-r--r-- root/root 2208 2026-02-18 09:13 etc/sysctl.conf drwx------ user/user 0 2026-02-17 23:28 home/user/.ssh/ -rw------- user/user 205 2026-02-17 23:29 home/user/.ssh/authorized_keys drwxrwxr-x user/user 0 2026-02-18 16:30 home/user/.vnc/ -rw-rw-r-- user/user 85 2026-02-18 15:32 home/user/.vnc/tigervnc.conf -rw-r--r-- root/root 3553 2026-02-18 08:04 etc/ssh/sshd_configKeeps permissions, keeps ownership, puts things where they belong (or copies from where they were), and you end up with a single file that can be stored on whatever filesystem.
I assumed something like this. That’s a perfectly valid usecase for a tar extracted to /.
But I love it how people always jump to the assumption that the one on the other end is the stupid one
alias rm=“rm -i”
Next time:
ls ~/etc rm -rv !$Or press
alt+.to paste final argument of previous commandThis is also dangerous because you could run the second command by accident later when browsing command history
with tab you can expand the !$, should be a zsh thing

Switch from using
rmtotrash.I’ve always just used
gio trash(formerlygvfs-trash). KDE-based systems have something similar (but with syntax that’s perfectly logical but completely unsuitable, in my opinion).The third party
trashpackage works in places the GUI and the aforementioned GUI-related command line tools may not. I can’t tell whether this is a bug intrashor in the system tools, TBH.For example, /tmp is one such directory where
trashworks butgio trashrefuses.Either way, the GUI Rubbish Bin won’t keep track if things are deleted from such places by
trash.The third party
trashpackage works in places the GUI and the aforementioned GUI-related command line tools may not. I can’t tell whether this is a bug intrashor in the system tools, TBH.Might be a bug I’ve never experience this issue with the
trash-clitools.
Genuinely curious… why using root for operations like these?
To feel the thrill
Sudo apt-get install /etc
Ok speaking of this, where do a distro’s config and boot scripts even come from? Are they in a package? Like on Debian so the .debs have metadata that can add cron jobs and such?
Yup
I am new to Linux and just getting somewhat comfortable as my daily driver, very proud of myself that I got the joke pretty quickly :)
Plot twist: this was a work computer.











