That edgy chroot can go … oops!

I’m quite a heavy user of chroots, since I work with many different releases, and Debian, too. That usually means I have to clean them up at some point, too.

It happened at least twice now: I deleted an old chroot without unmounting all those bind mounts I have in them (/proc, /sys, /tmp, and most importantly, /home). Thus an rm -rf /chroots/edgy will remove my entire Home-partition, too! Fortunately I Control-C’ed early enough the second time to not cause any real damage except for killing my X socket in /tmp. Phew! But the first time (some months ago already) I lost quite some amount of data.

Thus, very high in my list of things I’d change to a default if I had a time machine to go back to the design of Unix:

alias rm='rm --one-file-system'

which now went into my standard ~/.bashrc.