I'm trying to make a locked down, auto-restoring system that will restore itself once every week. I'm wondering if /tmp and /var/tmp can be safely removed if the system is booted on a different partition (e.g. /dev/sda1 is mounted as the filesystem root and /dev/sda2 is mounted on /mnt, so would it be safe to remove /mnt/tmp and /mnt/var/tmp?).
I've tried searching for answers on this, but I've only found people asking if it's safe to delete when it is actively in use which I already know it is not.
/var/tmp
is not cleared on boot, it's supposed to persist across reboots. Only/tmp
is cleared on boot. See e.g. https://askubuntu.com/questions/864383/is-it-safe-to-delete-files-from-var-tmp – Byte Commander Mar 16 '18 at 16:48/var/tmp
, apparently. – Thomas Ward Mar 16 '18 at 16:51