This issue usually occurs when Windows cannot release a file or does not have the required permission to delete it. Even after restarting your PC, some background services, startup applications, or system processes may still lock the file.
Here are a few methods you can try:
1. Close the Program Using the File
Open Task Manager by pressing Ctrl + Shift + Esc. Check if any application is using the file. Select the related process and click End Task. Then try deleting the file again.
2. Check File Permissions
Right-click the file and select Properties. Open the Security tab and check whether your Windows account has permission to modify or delete the file. If necessary, adjust the permissions using an administrator account.
3. Delete the File Using Command Prompt
Open Command Prompt as Administrator and run this command:
del /f /q “C:\Path\To\Your\File.ext”
Replace the path with the actual file location. Be careful while using this command, as it permanently removes the selected file.
4. Try Deleting the File in Safe Mode
Start Windows in Safe Mode. This loads Windows with fewer background programs and services. Navigate to the file location and try deleting it.
5. Check for File System Errors
Open Command Prompt as Administrator and run:
chkdsk C: /f
Replace C: with the drive containing the problematic file. Follow the instructions if Windows asks to schedule the scan.
Important: Before deleting anything, make sure it is not a required Windows system file or a file used by an important application.
If your purpose is to permanently erase sensitive files so they cannot be recovered using data recovery tools, you can also consider a secure data wiping solution such as SysTools Data Wipe.
I would recommend trying Task Manager, checking permissions, and Safe Mode first. These methods usually help identify why Windows is preventing the deletion.