Can't delete last item in Windows group (0X000010EF)
This error blocks deleting the last item in a group or resource. Usually shows when messing with file ownership or during bulk file operations. We'll fix it in three rounds, starting with the quickest.
The 30-second fix: uncheck the item, close the window, try again
This sounds stupid, but I've seen it work more times than I'd like to admit. Windows sometimes glitches when you try to delete the very last file, folder, or user account in a group. The quick test:
- Click on a different item in the same group (if there's one left).
- Press Ctrl+Z to undo any accidental selection.
- Close the folder or control panel window entirely.
- Reopen it and try deleting that last item again.
Expected outcome: If the error was a display ghost, it'll go away. You'll see the deletion succeed without the 0X000010EF box. If it doesn't, move to the moderate fix.
The 5-minute fix: release file handles and take ownership
This error often means something still has a hook into that item. Even if you think you closed everything, background processes can lock the last item. Here's what I do:
- Press Ctrl+Shift+Esc to open Task Manager.
- Under the Processes tab, look for any program that might be using that file – like an open Office doc, a media player, or even Windows Explorer itself.
- Right-click Windows Explorer and select Restart. Your taskbar will flash, but your desktop comes back in seconds.
- Now right-click the stubborn item and go to Properties → Security → Advanced.
- Next to Owner, click Change. Type your Windows username (for example,
domain\yournameor justyournameon a local PC) and click Check Names to verify. - Click OK. Put a check in Replace owner on subcontainers and objects.
- Click Apply – you'll get a security warning. Accept it.
- Back in the Permissions tab, select your user, then check Full control. Apply again.
- Close all property windows. Try deleting the item now.
Expected outcome: If the lock was just a stale handle, the delete works. If you still see 0X000010EF, you've got a deeper permission mess – go to the advanced fix.
The 15+ minute fix: reset permissions via command line and kill lingering handles
Sometimes the ownership change alone won't cut it because the system has cached security descriptors or a hidden process is holding on. I've seen this mostly after moving files between drives or when dealing with junction points. Here's the hard way, but it works:
Step 1: Force ownership and full permission inheritance
Open an administrator Command Prompt (search for cmd, right-click, Run as administrator). Run these commands one at a time. Replace C:\path\to\stubborn\item with your actual path.
takeown /f "C:\path\to\stubborn\item" /r /d y
icacls "C:\path\to\stubborn\item" /grant administrators:F /t /q /c
icacls "C:\path\to\stubborn\item" /reset /t /q /c
takeownforces you as the owner, recursively (/r).icacls /grantgives Administrators full control (:F) on all subfolders (/t).icacls /resetforces default permissions – this clears any weird ACLs that block deletion.
Expected outcome: You'll see successfully processed messages for each command. If you get access denied errors, double-check you're running as administrator and the path is correct.
Step 2: Find and kill the hidden handle
If step 1 completed but the error still pops, something is actively holding the item. Use Handle or Process Explorer (I prefer Process Explorer from Microsoft's Sysinternals).
- Download Process Explorer and run it as admin.
- Press Ctrl+F to open the Find Handle window.
- Type part of your item's name (like the filename or folder name) and click Search.
- You'll see a list of processes that have a handle open to that item. Common culprits:
explorer.exe,SearchIndexer.exe,OneDrive.exe, or any antivirus scanner. - Right-click the offending process and choose Kill Process or Close Handle (if you can close just the handle, do that – it's safer).
Expected outcome: After closing the handle, try deleting the item again. If the process was the culprit, it'll delete immediately.
Step 3: If nothing else works – safe mode or offline deletion
When all else fails, boot into Safe Mode (hold Shift while clicking Restart, then Troubleshoot → Startup Settings). In Safe Mode, Windows loads a bare minimum of drivers. The error almost never appears there. Delete the item normally once you're in Safe Mode.
If Safe Mode also fails, you've got either a corrupted file system or a hardware issue. Run chkdsk C: /f from an admin command prompt and reboot. That's your last resort before reformatting.
One more thing: this error is usually not malware. It's a permissions or locking problem. Don't waste time running virus scans unless you have other symptoms.
Was this solution helpful?