I have run out of space in my hard drive and after a bit of analyzing, I found that a windows.sys file is taking upto 145 GB in my hard drive. This is found in the C:\ProgramData\Windows directory and is marked as a system file. I was wondering if it was ok to delete this. I am using Windows 10.
you cannot delete system files, even as administrator. This is because Windows system files are owned by the TrustedInstaller service by default, and Windows File Protection will keep them from being overwritten.