I'm designing a kiosk device with a Raspberry Pi.
The device is powered down by removing power without warning (not by graceful shut-down).
If a USB drive is mounted at the time (say "SanDisk"), at the next power-up, the "SanDisk" folder is still present in /media/pi/ (though inaccessible), and a new folder, "SanDisk1", appears.
After 100 times, there are 100 folders in /media/pi/, from "SanDisk1" to "SanDisk99".
What's the best way to clear the ghost USB folders from /media/pi/?
I can use a Python script.