-   Linux - General (
-   -   unable to delete mtpfs mountpoint (

alexbib 12-05-2013 01:30 PM

unable to delete mtpfs mountpoint
So I used mtpfs to create a mountpoint for my smartphone on my computer, and after unplugging my phone I'm left with a buggy directory that I cannot delete.

rm -rf (even as root) gives me "No such file or directory" or "Is a directory" and does nothing. I tried umount to unmount it before deleting it but it didn't help. What can I do?


corp769 12-06-2013 06:06 AM

Check out the man page to fusermount

fusermount -u [mountpoint]

alexbib 12-06-2013 10:35 AM


Originally Posted by corp769 (Post 5076434)
Check out the man page to fusermount

fusermount -u [mountpoint]

I get failed to unmount: Invalid argument

Edit: ok, got it to work, had to remount it and then unmount it. Thanks for the help.

alexbib 04-04-2014 04:52 PM

I'm sorry to be a bother, but I'm having the same problem again. I'm able to mount and unmount the filesystem, but even after unmounting, I cannot delete the mount point, I get the "No such file or directory". What should I do?

PClinuxOS 04-06-2014 03:31 PM

@ alexbib

Does the directory name have any special characters/symbols or spaces. If so, you need to escape the special character with a back slash or quotes. For example if the directory is called My Music and is empty, you can delete it this way:


rmdir My\ Music
#The back slash escapes the space character in My Music



rmdir "My Music"
#The quotes here also escapes the space character

Other Questions

Have you tried running the sync command after umounting the device? The sync command updates the filesystem.

Have you tried deleting the directory from the file manager?

Is the directory immutable? If a file or directory has the immutable flag set, not even root can delete or modify it unless the root user removes the immutable flag.

alexbib 04-06-2014 11:47 PM

running sync worked, thanks!

PClinuxOS 04-07-2014 10:43 AM


Originally Posted by alexbib (Post 5147899)
running sync worked, thanks!

You're welcome alexbib

All times are GMT -5. The time now is 05:57 PM.