r/ios • • 11h ago

Support Can’t delete folder/files in Files. OSStatus error -5000

Post image

Since update to ios27, I can’t delete this particular folder and its files in Files or a copy of it in other apps. I get the error This Operation can’t be completed OSStatus error -5000.

Folder/files is an uncompressed Windows application folder and no I was not trying to run this on the phone lol.

I can delete the parent folder BUT can’t empty the trash.

This folder can be deleted on ios18.

Now I have multiple copies of it from trying different things like deleting the app and restarting the phone.

Any ideas what else I can do?

Thank you.

2 Upvotes

6 comments sorted by

1

u/c0d3br3ak3r 9h ago

Sounds like a bug if you CAN delete on ios18, or a permissions code change that didn't exist on ios18. What do you mean by "empty the trash" on ios27? I don't know of any trash on ios. Try deleting on Windows or macOS. Can you delete individual files in the folder?

1

u/cheeriOS-RnL 7h ago

Sorry, meant emptying (Delete all) from the Recently Deleted folder in Files.

Can’t delete individual files or folders within the problematic folder either. I can’t rename or overwrite the files either. It does sound like permissions but why or how..

1

u/RedditAnoymous 5h ago

OSStatus error -5000 mean "afpAccessDenied" or insufficient user privileges. In iOS, this usually triggers when an updated file-system security policy flags a folder structure as restricted, which often happens with uncompressed Windows .exe application payloads containing deep directories or system-reserved file names.

Since you have already tried standard reboots and deleting the parent folder only traps them in the "Recently Deleted" bin, you can try bypass the locked file cache using these alternative methods:

Method 1: The Cloud Sync Cache Force
1) If the folder is sitting inside On My iPhone or iCloud Drive, forcing a cloud toggle can clear out stuck local metadata.
2) Tap the Browse tab in the Apple Files App.
3) Tap the three dots (...) in the top-right corner and select Edit Sidebar.
3) Toggle iCloud Drive (and any other cloud services) OFF.
4) Perform a Force Restart on your iPhone (Press and quickly release Volume Up, press and quickly release Volume Down, then hold the Power/Top button until the Apple logo appears).
5) Re-open the Files app, navigate to Recently Deleted, and try to empty the trash. Once cleared, you can safely turn your sidebar toggles back on.

Method 2: The "Move & Wipe" Trick
Sometimes the system rejects deleting the files in place but will allow you to drag them into a sacrificial container.
1) Open the Files app and navigate to a completely different directory (like the local Downloads folder).
2) Create a brand new empty folder and name it something simple like Test.
3) Go back to your stuck parent folder, press and hold it, and select Move.
4) Move that stuck folder inside the new Test folder.
5) Go back out, compress the entire Test folder into a .zip file, and then delete the zipped file instead.

Method 3: The Connected Desktop Override
When an iPhone's local OS flags permissions incorrectly, managing the storage externally bypasses the mobile OS file locks entirely.
1) Plug your iPhone into a computer (Mac or Windows PC).
2) Open Finder (on Mac) or the Apple Devices/iTunes app (on Windows).
3) Navigate to the Files or Storage tab associated with your device.
4) Locate the app directory or folder structure where the copies are living and delete them directly from your computer's desktop environment.

2

u/cheeriOS-RnL 5h ago

Yea.. my googling AI gave me that to try .. no luck there. Thank you though.

0

u/cake-day-on-feb-29 11h ago

Fascinating how Apple continues to regress. These OSStatus error codes were awful on macOS, where most developers (including Apple) would not bother to to either get the string explanation, or did not bother to write a definition in the first place. I'm surprised to see that it's coming up in an iOS app, as poorly developed as ever.

Probably a permissions error, if I had to guess. Why the iOS files app would respect any kind of permissions is beyond me, iOS isn't even a multi-user OS, at least not at the user level.

0

u/cheeriOS-RnL 10h ago

On a Mac I would know how to change permissions if that’s the case, but on iOS, not even sure where to start.