Quick fix: Take ownership with takeown /F "C:\path\to\file" /A, then grant full control with icacls "C:\path\to\file" /grant administrators:F, then delete — many files reject administrator deletion because TrustedInstaller (a system account) owns them.
You’re signed in as an administrator, you right-click a file and choose Delete, and Windows says: You require permission from TrustedInstaller to make changes to this file. Administrator rights aren’t enough — Windows reserves certain system files under a separate account called TrustedInstaller. The fix is to transfer ownership to your account first, then grant yourself delete permission.
Affects: Windows 11 (and Windows 10) system files, files inside Program Files, files from a previous Windows install (Windows.old).
Fix time: ~3 minutes per file/folder.
What causes this
NTFS files have an owner and an ACL (access control list). The administrator group has broad rights, but specific files can be owned by other accounts — most commonly NT SERVICE\TrustedInstaller, the account Windows Setup uses to install system files. When TrustedInstaller owns a file and the ACL grants only TrustedInstaller delete rights, even administrators can’t delete it.
The fix is a two-step ACL change: take ownership (gives your account the right to modify the ACL), then grant your account full control (gives your account the right to delete).
Method 1: Take ownership and delete via takeown + icacls
The command-line approach. Works on individual files or entire folders.
- Open Terminal (Admin) from the Start right-click menu.
- For a single file:
takeown /F "C:\path\to\stubborn.file" /A icacls "C:\path\to\stubborn.file" /grant administrators:F del "C:\path\to\stubborn.file" - For a folder and all its contents:
takeown /F "C:\path\to\folder" /R /A /D Y icacls "C:\path\to\folder" /grant administrators:F /T rmdir /s /q "C:\path\to\folder"The
/Rrecurses,/Aassigns to Administrators group,/D Yanswers yes to recursion prompts,/Trecurses for icacls. - The deletion now succeeds. If it doesn’t, the file has additional protection (file lock by a running process) — see Methods 2 and 3.
This pair of commands handles 90% of “administrator can’t delete” cases.
Method 2: Use File Explorer Properties → Security tab
GUI equivalent. Slower but discoverable.
- Right-click the stuck file or folder → Properties → Security tab.
- Click Advanced at the bottom.
- Next to Owner, click Change.
- Type Administrators in the object name field. Click Check Names to verify, then OK.
- If it’s a folder, tick Replace owner on subcontainers and objects.
- Click OK to apply ownership change.
- Reopen Properties → Security. Click Edit, then Add.
- Type Administrators, click Check Names, then OK.
- Select Administrators in the list, tick Full control, click OK twice.
- Delete the file normally.
This is the right approach if you’re uncomfortable with command line, but it’s tedious for multiple files.
Method 3: Identify the process holding the file (when ownership change isn’t enough)
Use when Methods 1 and 2 succeed in changing ownership but the file still won’t delete.
- Press
Win + R, typeresmon, press Enter. Resource Monitor opens. - Switch to the CPU tab.
- Expand Associated Handles.
- In the Search Handles box, type any unique part of the filename.
- The matching processes appear. Note the Image (process name).
- If the process is non-essential, right-click and choose End Process. If it’s essential (e.g., a system service you can’t stop safely), continue to step 7.
- For files held by essential services: open services.msc, stop the corresponding service, delete the file, restart the service.
- If the process is System (PID 4), the file is locked at the kernel level — boot to Safe Mode and delete from there.
Resource Monitor identifies even invisible file holders — antivirus real-time scans, Search Indexer, OneDrive sync.
How to verify the fix worked
- The file or folder no longer exists at its previous path.
- Run
Test-Path "C:\path\to\stubborn.file"in PowerShell. Result: False. - For folders, the parent folder shows the subfolder removed.
If none of these work
Three deeper situations remain. System Restore points / Shadow copies: files inside C:\System Volume Information are protected at a special level — even ownership change doesn’t help. Use vssadmin delete shadows /for=C: /all /quiet to remove shadow copies wholesale, then the folder contents can be deleted (Windows recreates an empty folder on next restore-point creation). Encrypted files: BitLocker-encrypted files refuse normal delete operations if the key isn’t available — suspend BitLocker, delete, resume. Files in active backup images: Veeam, Macrium Reflect, or other backup tools lock files during incremental backup operations. Wait for the backup to finish, then delete. Filesystem corruption: if a file’s NTFS metadata is corrupted, no method works without filesystem repair. Run chkdsk C: /f and reboot to let it repair.
Bottom line: Administrator rights aren’t supreme on NTFS — TrustedInstaller owns many system files. takeown + icacls transfer ownership and rights, then deletion works.