I created a new folder inside /sdcard/ and something went wrong with it since other 600 sub-folders (one inside the other) were created as well. I noticed the problem when trying to rename the 'main' folder, as it returned a "folder not found" error.

I know the number of sub-folders because I checked the properties of the main folders. There are also 160 files which I did not place there and I haven't checked what they are.

My phone is rooted and for the operation I used the CM built-in file manager. I've been trying deleting the folders both via UI and through the shell but nothing works. If I run

rm -r /sdcard/<myfolder>/

It returns "folder not empty". I've also tried the


option but nothing changes. Rebooting didn't solve the issue.

I hope it's not about a corrupted partition...

Any suggestions?

  • I think you tried -f and -r separately. You need to use both the switches together, ie rm -rf /sdcard/<yourfolder>/ – daltonfury42 Sep 9 '15 at 11:00
  • @daltofury42 No, I tried -rf, I've just edited my post to make that clear. – cwbrd Sep 9 '15 at 11:09
  • Try adding a -v switch and post back any relevant outputs. – daltonfury42 Sep 9 '15 at 11:16
  • Can you give us the output of ls -l on /sdcard and grep that folder in it? Also, do you have a custom Recovery installed? In my case, my clockworkmod directory wasn't getting deleted because I suppose it's group and owner wasn't media_rw and gave me the error folder not empty. I booted into custom Recovery and nuked it for good. – Firelord Sep 9 '15 at 11:18
  • @daltofury42 No relevant outputs. @Firelord: drwxrwx--- root sdcard_r 2015-09-09 11:00 Tasks. Also yes, I've got TWRP installed. I think I'll try deleting the folders from there. – cwbrd Sep 9 '15 at 11:42

Issue resolved by running rm -r from the Custom Recovery cmd.

I'll create the folder again and see if the problem reoccurs, hopefully it was just a 'random' glitch. (I should probably mention that I use a nightly version of CM12.1, not a stable ROM).

| improve this answer | |

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.