How do I force delete Undeletable files?

Deleting files that seem undeletable can be frustrating. Sometimes files become corrupted or the operating system won’t allow you to delete them through normal means. Fortunately, there are a few tricks you can use to force delete these stubborn files.

Try Deleting in Safe Mode

One of the easiest ways to delete undeletable files is to boot your computer into safe mode. Safe mode loads a minimal version of Windows with just the essential drivers and services. This prevents any programs or processes from locking files and making them undeletable.

To enter safe mode in Windows 10:

  1. Open the Start menu and select the Power button
  2. Hold down the Shift key while clicking Restart
  3. On the Choose an Option screen, select Troubleshoot > Advanced options > Startup Settings > Restart
  4. After your PC restarts, you’ll see a list of startup settings. Select 4 or press F4 to start in Safe Mode.

Now try deleting the file. Since most applications and processes are disabled in safe mode, you should be able to delete files that you couldn’t previously.

Unlock the File in Handle

Sometimes a program or process will lock a file, preventing you from deleting it. You can use a tool like Handle or Process Explorer to find and unlock these handles.

  1. Download and install Handle or Process Explorer
  2. Run Handle and browse to the file you want to delete
  3. Look for a handle with a path that matches your file. Check the box next to it and click Unlocker > Unlock Handle
  4. Similarly in Process Explorer, find the file in the lower pane. Right-click the corresponding process in the top pane and select Close Handle
  5. Now try deleting the file again

Unlocking the handle that has a lock on your file will allow you to delete it.

Delete File in Command Prompt

You can delete undeletable files from an elevated Command Prompt window. This gives you direct access to file system commands.

  1. Open the Start menu and search for “cmd”
  2. Right-click Command Prompt and select Run as Administrator
  3. Type the following command to delete the file, replacing filename with the actual name:

del /f /q “filename”

The /f forces the deletion while /q quiets confirmation prompts. Use quotation marks around filenames with spaces.

Delete File in Powershell

Similar to Command Prompt, you can use Powershell commands to force delete stubborn files.

  1. Open the Start menu and search for “powershell”
  2. Right-click Windows Powershell and select Run as Administrator
  3. Enter the following command to remove the read-only attribute and delete the file:

Remove-Item “filename” -Force

This will force deletion of the file without confirmation.

Delete File in Safe Mode Command Prompt

For extra deletion power, you can combine safe mode with the Command Prompt. This prevents any other processes from locking the file while giving you access to the del command.

  1. Open the Start menu, search for “cmd” and select Run as Administrator
  2. Type the following command to restart into Safe Mode:

bcdedit /set {default} safeboot minimal

This will set Windows to boot into minimal Safe Mode on next restart.

  1. Restart your PC and enter Safe Mode
  2. Open Command Prompt as Admin again
  3. Use the del command above to delete the file
  4. When done, run this command to exit Safe Mode:

bcdedit /deletevalue {default} safeboot

Check for Malware

If you’ve tried everything above and still can’t delete a file, the next thing to check for is malware. Viruses and other malware can prevent files from being deleted as a way to persist on the system.

Run a full antivirus scan. If it finds an infection, clean it and then try deleting the file again. You can also use the free tools Malwarebytes and HitmanPro to check for more deeply embedded malware.

Delete During Windows Install

As a last resort, you can delete stubborn undeletable files during a clean install or upgrade of Windows.

  1. Boot from your Windows install USB or DVD
  2. When prompted, select your language and click Next
  3. Choose the Custom install option
  4. Select each partition and click Delete to remove it
  5. This will fully wipe your hard drive, deleting all files
  6. Proceed with a clean install of Windows

Since you are reinstalling Windows from scratch, the normal deletion rules don’t apply. This ensures you can fully wipe your drive.

Use Unlocker Software

Tools like Unlocker can help delete files that otherwise seem impossible to remove. The free Unlocker utility installs an Explorer context menu option to easily delete locked files.

  1. Download and install Unlocker
  2. Right-click the undeletable file in Explorer and select Unlocker
  3. Choose Delete from the menu and confirm deletion

Unlocker will safely delete the file by closing handles, removing permissions restrictions, and stopping relevant processes.

Conclusion

While some files seem impossible to delete at first, there are almost always ways to force their removal. By using Safe Mode, handle unlocking tools, Command Prompt, Powershell, antivirus scans, Windows reinstallation, or dedicated software like Unlocker, you can safely delete just about any file.

The key is using the right tool for the situation. For simple locked files, try Safe Mode first. Handle unlockers like Process Explorer can remove program locks. Command Prompt and Powershell give you low-level access to delete operations. And tools like Unlocker have customizable deletion routines tailored for undeletable files.

With the right technique, no file is truly undeletable. Just keep trying different methods until you find the one that works to force the removal. Be patient and persistent, and you can reclaim your disk space.

Use Unlocker Software

Tools like Unlocker can help delete files that otherwise seem impossible to remove. The free Unlocker utility installs an Explorer context menu option to easily delete locked files.

  1. Download and install Unlocker
  2. Right-click the undeletable file in Explorer and select Unlocker
  3. Choose Delete from the menu and confirm deletion

Unlocker will safely delete the file by closing handles, removing permissions restrictions, and stopping relevant processes.

Try Deletion in Safe Mode

One of the easiest ways to delete undeletable files is to boot your computer into safe mode. Safe mode loads a minimal version of Windows with just the essential drivers and services. This prevents any programs or processes from locking files and making them undeletable.

To enter safe mode in Windows 10:

  1. Open the Start menu and select the Power button
  2. Hold down the Shift key while clicking Restart
  3. On the Choose an Option screen, select Troubleshoot > Advanced options > Startup Settings > Restart
  4. After your PC restarts, you’ll see a list of startup settings. Select 4 or press F4 to start in Safe Mode.

Now try deleting the file. Since most applications and processes are disabled in safe mode, you should be able to delete files that you couldn’t previously.

Unlock the File Handle

Sometimes a program or process will lock a file, preventing you from deleting it. You can use a tool like Handle or Process Explorer to find and unlock these handles.

  1. Download and install Handle or Process Explorer
  2. Run Handle and browse to the file you want to delete
  3. Look for a handle with a path that matches your file. Check the box next to it and click Unlocker > Unlock Handle
  4. Similarly in Process Explorer, find the file in the lower pane. Right-click the corresponding process in the top pane and select Close Handle
  5. Now try deleting the file again

Unlocking the handle that has a lock on your file will allow you to delete it.

Delete in Command Prompt

You can delete undeletable files from an elevated Command Prompt window. This gives you direct access to file system commands.

  1. Open the Start menu and search for “cmd”
  2. Right-click Command Prompt and select Run as Administrator
  3. Type the following command to delete the file, replacing filename with the actual name:

del /f /q “filename”

The /f forces the deletion while /q quiets confirmation prompts. Use quotation marks around filenames with spaces.

Delete in Powershell

Similar to Command Prompt, you can use Powershell commands to force delete stubborn files.

  1. Open the Start menu and search for “powershell”
  2. Right-click Windows Powershell and select Run as Administrator
  3. Enter the following command to remove the read-only attribute and delete the file:

Remove-Item “filename” -Force

This will force deletion of the file without confirmation.

Delete in Safe Mode Command Prompt

For extra deletion power, you can combine safe mode with the Command Prompt. This prevents any other processes from locking the file while giving you access to the del command.

  1. Open the Start menu, search for “cmd” and select Run as Administrator
  2. Type the following command to restart into Safe Mode:

bcdedit /set {default} safeboot minimal

This will set Windows to boot into minimal Safe Mode on next restart.

  1. Restart your PC and enter Safe Mode
  2. Open Command Prompt as Admin again
  3. Use the del command above to delete the file
  4. When done, run this command to exit Safe Mode:

bcdedit /deletevalue {default} safeboot

Check for Malware

If you’ve tried everything above and still can’t delete a file, the next thing to check for is malware. Viruses and other malware can prevent files from being deleted as a way to persist on the system.

Run a full antivirus scan. If it finds an infection, clean it and then try deleting the file again. You can also use the free tools Malwarebytes and HitmanPro to check for more deeply embedded malware.

Delete During Windows Install

As a last resort, you can delete stubborn undeletable files during a clean install or upgrade of Windows.

  1. Boot from your Windows install USB or DVD
  2. When prompted, select your language and click Next
  3. Choose the Custom install option
  4. Select each partition and click Delete to remove it
  5. This will fully wipe your hard drive, deleting all files
  6. Proceed with a clean install of Windows

Since you are reinstalling Windows from scratch, the normal deletion rules don’t apply. This ensures you can fully wipe your drive.

Conclusion

While some files seem impossible to delete at first, there are almost always ways to force their removal. By using Safe Mode, handle unlocking tools, Command Prompt, Powershell, antivirus scans, Windows reinstallation, or dedicated software like Unlocker, you can safely delete just about any file.

The key is using the right tool for the situation. For simple locked files, try Safe Mode first. Handle unlockers like Process Explorer can remove program locks. Command Prompt and Powershell give you low-level access to delete operations. And tools like Unlocker have customizable deletion routines tailored for undeletable files.

With the right technique, no file is truly undeletable. Just keep trying different methods until you find the one that works to force the removal. Be patient and persistent, and you can reclaim your disk space.