Delete old windows and program files from old drive

By | 16. April 2019

If you have upgraded your PC with new hard drive and old one is left over fro backups or other purposes then this is how you can delete system files what are usually locket out:


This is for power users only!. Check , double-check and check one more time the drive letter and directory you are about to delete, there is no returning back after that!


  1. Run command line in administrator rights
  2. Take ownership using next command:  takeown /F “Y:\Program Files” /A /R /D Y
  3. Modify permissions using next command: icacls “Y:\Program Files” /T /grant administrators:F
  4. And finally delete files: rmdir /s /q “Y:\Program Files”

Repeat same for “Y:\Windows” and “Y:\Program Files (x86)” (if present).

Now all space is feed for other purposes.


Leave a Reply