How to force the deletion of a locked file that has no locking handle on Windows?

We are always glad to help, but just to double-check (since you didn't elaborate), are you certain that this isn't a critical operating system file?

If you are confident that this isn't an essential OS or application file, you can always utilize a Linux Live CD of some type and navigate to the file accordingly. Under those circumstances, it won't be constrained by the Windows operating system and can easily be deleted.

If you are trying to completely delete the Windows.old folder, that is understandably frustrating. I have encountered similar problems following a Windows 10 upgrade, and was finally able to delete it by booting into a command prompt. Try utilizing the following method:

  1. While logged into Windows 10, open the Run window by holding WinKey + R
  2. Type shutdown /r /o /f /t 00 in the subsequent window, then press Enter
  3. After the system reboots, click on Troubleshoot

    Click on Troubleshoot

  4. Click on Advanced Options

    Click on Advanced Options

  5. Click on Command Prompt

    Click on Command Prompt

  6. The ensuing window will ask you to Choose an account to continue

  7. Select a local administrator account, type in the appropriate password, and click on Continue
  8. Within the command prompt, type diskpart and press Enter (as seen below)
  9. In the command prompt, type list volume and press Enter
  10. From the listed volumes, look for and verify the drive letter of your Windows 10 drive.
  11. In the command prompt, type exit and press Enter

    Command Prompt Window

  12. Ensure that you substitute "D" in the command below with the actual drive letter of your Windows drive as displayed from step 10 (above).

  13. To delete the "Windows.old" folder, type RD /S /Q "D:\Windows.old" and press Enter
  14. Close the command prompt window.
  15. Back at the Choose an option window, click on Continue to restart the computer.

(Source: How to Delete Windows.old Folder in Windows 10)