How do I delete an orphaned folder in /media?

I’ve removed a physical drive and removed its entry in /etc/fstab, but it still shows in /media. How do I delete this orphaned folder from /media ?

You mean you do not know how to remove a directory?

As root

rmdir /media
1 Like

D’oh! I simply never thought about that.
I thought it might be written in some obscure file I needed to edit. I didn’t initially create the directory when I added the drive and thought when I removed it’s reference in /etc/fstab it would simply disappear.
Thanks!

It is just a directory. Nothing less, nothing more. That you used is as a mount point is not so important as soon as you stop doing so.

And /etc/fstab is only a configuration file. It defines which file system to mount where. It does not create anything.

Maybe at creation you used a tool like YaST > Partition Manager (bad name :frowning: ). YaST is very helpfull, it will not only create the entry, but also create the mount point if it does not exist already. Those GUIs are very nice, but they hide reality from the users. :frowning:

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.