Stale mount points. As far as Linux is concerned they are still a legit file directory even if no devices are mounted on them. What to do? Simple. Get rid of stale mount points and you won't put stuff there.
I use a link to this tasty snock* in my Startup directory to clear the essential computing surfaces when I first boot:
delete-stale-mnts:
Code: Select all
#! /bin/bash
#
# Remove stale mount points in '/mnt' - jafadmin
#
RAW=$(ls -d /mnt/*)
for Line in $RAW
do
if [ ! -z "$(mountpoint $Line | grep not)" ]; then rm -R $Line; fi
done