How to delete a file that won’t delete in Windows 10
Method 1: Restart PC
The first thing you can try to do when faced with the described problem is to simply restart your computer. If the problem was caused by some minor glitch, or one of the running programs blocked the deletion, after restarting the system, the file will be deleted on the first try.
Method 2: Removing in “Safe Mode”
If the file continues to be held by a non-critical system or third-party process, booting the PC in Safe Mode will help get rid of such a file .
- Open the quick command window with the Win + R key combination , type in it
msconfigand click “OK” .
- In the System Configuration utility window that opens , switch to the Boot tab , check the Safe Mode option and confirm with the OK button .
- Confirm restarting your computer.
After Windows 10 boots into safe mode, try deleting the problematic file in the usual way. To boot in normal mode, run the System Configuration utility again and on the General tab, enable the Normal startup option , then save the settings and reboot.
Method 3: Using an archiver
This solution can be effective if you need to delete a file or folder with a long path or dots/spaces at the end of the file name. Any popular archiver will do, the same WinRAR or 7-Zip . Let’s consider deleting a file on the example of working with WinRAR.
- Right-click on the file that cannot be deleted and select “Add to archive” from the context menu .
- Give the created archive a short name, in the archiving options enable the option “Delete files after archiving” and click the “OK” button .
Since most archivers ignore Windows long path restrictions, the file should be deleted without problems. Then delete the archive itself.
Method 4: Using “Command Prompt”
To delete files with long paths or incorrect names, you can use the classic “Command line” .
- Launch the console from Windows 10 search so you can find it the fastest. It is necessary to call the “Command line” on behalf of the administrator.
- Form and execute a command in the console like
del \?C:fullpath.txt, where C is the drive letter, and fullpath is the full path to the file to be deleted, including its name (example in the screenshot). If there are dots or problems at the end of the filename, be sure to include them as they are also part of the path.
Method 5: Change permissions
Lack of user access rights to an object is one of the most common causes of a file deletion error. You can eliminate it by obtaining full rights to the file, and then try to erase the object again.
Option 1: Windows Tools
- Open the “Properties” of the problematic file.
- Switch in the properties window that opens to the “Security” tab and click the “Advanced” button .
- Click “Disable Inheritance” in the “Advanced Security Options” window .
- Select the Convert inherited permissions to explicit permissions on this object option .
- Make sure you are the owner of the file as a user or administrator. Otherwise, click the Edit link to proceed to change ownership.
- Enter your local username or your Microsoft account name in the user or group selection box that opens and click OK .
- Save your settings.
- Click the Change button in the previous Properties window .
- If the desired user or group is not listed, click the Add button in the group permissions window and add the user or administrator (yourself) as shown in Step 6.
- Select the group in which you are a member ( “Administrators” or “Users” ) and set full access rights for it. Save your changes.
Option 2: TakeOwnershipEx Utility
An easier way to get permissions on a file or directory is to use the third-party utility TakeOwnershipEx. This small free solution allows the current user to get rights to an object with one click.
Download TakeOwnershipEx from the official website
- Download the archive with the utility from the developer’s official page and unzip it.
- Run the TakeOwnershipEx-220.127.116.11.exe executable file and install the utility.
- Right-click on the problematic file and select the option “Get access / Restore rights” from the context menu .
- If successful, the utility will return the message “Get full access to the file / folder” .
Method 6: Using unlock utilities
To remove the so-called non-removable files in Windows 10, you can use specialized unlocker applications. Their use is effective in cases where a file or other object is held by some system or third-party process, and they also allow you to delete files and folders with long or incorrect names. You can view the list of these tools, as well as see examples of their use, at this link.
Method 7: Using LiveCD Linux
This is the most reliable and effective, but at the same time the most difficult way to get rid of a file or any other object that cannot be deleted. Its essence is to obtain exclusive access to the computer’s file system by loading it from a Linux-based LiveCD. Any LiveCD with a file manager on board will do, so, in this example, the Puppy Linux distribution is used.
- Download the boot image and burn it to a flash drive using Rufus or a similar program.
- Boot the computer from the LiveCD.
- Select the partition on your Linux desktop that contains the file you want to delete. If you don’t know which section it is, check them all one by one.
- Right-click on the file to be deleted and select the “Delete” option from the context menu .
- Confirm the deletion by clicking the “Yes” button.
The procedure for deleting files in other LiveCDs may be slightly different, but the essence is about the same.
Read Also :Create Bootable drive with Rufus , Easy Method