2

I know this has been asked before but my case is very different. Allow me to explain.

I'm running Windows 10. I dual boot Linux. I deleted my Windows.old from Linux.. err.. but it wasnt permanent delete. so it got moved to Trash instead.

There is no option for me to clean this via Disk cleanup utility ofcourse.

I could try the other option of taking ownership and then deleting but I noticed something.

The files there are actually hardlinks to current installated windows. Example.

fsutil hardlink list C:\Windows\Fonts\arial.ttf  

\Windows\WinSxS\amd64_microsoft-windows-font-truetype-arial_31bf3856ad364e35_10.0.15063.0_none_83974968e629cd54\arial.ttf
\.Trash-999\expunged\138177440\WINDOWS\Fonts\arial.ttf
\.Trash-999\expunged\138177440\WINDOWS\WinSxS\amd64_microsoft-windows-font-truetype-arial_31bf3856ad364e35_10.0.15063.0_none_83974968e629cd54\arial.ttf
\Windows\Fonts\arial.ttf

I've used Reset this PC before. (Settings > Recovery > Reset this PC)

So I'm guessing when windows reinstalls via this way it doesnt actually copy new files.. just changes the disk pointers to it.. (i.e hardlinks)

Is it safe to delete the .Trash-999 folder via taking ownership? How would I go about deleting this folder?

Update: As pointed in the comments I just tried removing them from Linux again. However I'm getting this error.

rm: cannot remove '.Trash-999/expunged/138177440/Prog..: Input/output error

Also I cannot seem to read these files from Linux..

cat /run/media/cswl/windrv/Windows/Fonts/arial.ttf
cat: /run/media/cswl/windrv/Windows/Fonts/arial.ttf: Input/output error
1

Even using PSexec and RunasTI I couldnt delete the files from the Windows.old

Simply renaming the folder to Windows.old and using Disk Cleanup to clean Previous installation of Windows was enough. Why didn't I think of this earlier.

However, some files from Cortona were still unable to be deleted even by Disk Cleanup. So I just deleted that from Linux.

I'm still getting I/O error for some of the files in Windows directory, but that should be another question I guess.

0

I can't say for certain but it should fine given the behavior of hardlinks. The file will remain on disk so long as here is still a valid link to it somewhere else.

I think the core of your question is whether deleting a n NTFS hardlink for Windows from Linux will somehow delete all hardlinks and break your Windows system. Because the hardlinks are a feature of the underlying filesystem itself then it should be fine. Windows doesn't keep track of hardlinks-- that's the filesystem's job.

Note that when it comes to data I always say things in terms of what "should" happen. But data is data and there is always the risk that something could go wrong.

See here where by doing nothing particularly unusual I corrupted an NTFS volume last week: How to diagnose and repair this NTFS volume

  • It will remain, but I'd be careful with changing it, i.e. takeown/icacls/etc. – grawity Nov 21 '17 at 13:05
  • This is a good point. The Disk cleanup utility probably invokes an elevated task that itself has permission to delete these files as they're probably owned by TRUSTEDINSTALLER and SYSTEM. He said that he deleted it from Linux so I assume he's talking about his Linux trash bin where these NTFS permission are moot anyways. – Zhro Nov 21 '17 at 13:08
  • Thanks for the insights.. I will try deleting them from Linux again.. I was just unsure of the hardlinks. – cswl Nov 21 '17 at 13:18
  • Updated question.. I'm getting Input/output error from Linux – cswl Nov 21 '17 at 13:24
  • Run chkdsk from Windows on that volume and report back. – Zhro Nov 21 '17 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.