I am using PCManFM 1.2.5 as file manager on Ubuntu 18.04.2. When I go to my media folder, there I find listed the names of every external drive I ever connected and every disk I ever inserted in my dvd drive and even for my WLAN stick a separate entry for every time I connected it to the computer. How can I get Ubuntu to empty this list daily or forget about the devices as soon as they get disconnected?

  • How do you mount your partitions/devices? Are you using Lubuntu (LXDE) or Ubuntu (GNOME) or another desktop on your 18.04.2 as I haven't seen that behavior before, and cannot re-create it on my Lubuntu 18.04.2 system. Do you correctly umount or eject the devices before unplugging? (as I always do that, and possibly missing this step that causes the mount directory to never be wiped)
    – guiverc
    Aug 6, 2019 at 21:42

1 Answer 1


You probably didn't unmount the drives appropriately; this is a common misconception when people are switching from Windows. This usually results in the mountpoints still being available, and shown in file managers.

Just make sure, before you remove an external drive, to hit the unmount or eject button next to the drive name in PCManFM, or in the drive list in the system tray.

To remove the remaining mountpoint directories,

  1. make sure no external drives are currently plugged in/mounted,
  2. perform this command:

    sudo rmdir /media/*
  • Maybe put that in your boot up? Aug 7, 2019 at 0:08
  • @WinEunuuchs2Unix I wouldn't recommend that; this workaround is just for cleaning up, but the default action should always be proper unmounting.
    – Murphy
    Aug 7, 2019 at 6:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.