Manage Learn to apply best practices and optimize your operations.

The Occasional Resurgence of Windows.old

I’m working on my Lenovo T520 laptop this week, visiting with my Dad in his nursing home. Yesterday, I was scanning that PC’s C: drive and saw two anomalies. First, a Windows.old folder, and second, the $GetCurrent folder. Both of these are related to Windows ugrades. Windows.old, of course, is where the previous OS version gets stashed for 10 days (by default) after the upgrade. $GetCurrent includes logs of the most recent upgrade, and may also include the install files for that process. I’d already run Disk Cleanup on this machine after the 1803 upgrade in April, so I was a little surprised to see these hangers-on persisting so long after the act, so to speak. But I’ve been upgrading Windows 10 long and often enough to know that an occasional resurgence of Windows.old (and other stuff, like $GetCurrent) is just something that happens from time to time.

Cleaning Up After An Occasional Resurgence of Windows.old

As soon as I realized what was going on, I also realized I didn’t bring a bootable repair disk or USB stick with me. I won’t be making that mistake again, as I plan to drop one into my traveling bag as soon as I return home. I tried my recovery partition on the laptop only to be informed that it wouldn’t boot. So I have some repair work ahead of me upon my return home.

The easiest way to root out Windows.old is by running Disk Cleanup with admin privileges. But because I’d already done that on this PC, I knew something odd was up in the Windows.old file structure. On previous such encounters, I’ve seen audio and video drivers remain in use in Windows.old despite the handover to a new Windows image. This time, though, it was something different. The  folder named

C:\Windows.old\Users\Username\AppData\Local\Packages\
Microsoft.Windows.Cortana_cw5n1h2txyewy\LocalState

wouldn’t go away when I tried deleting the entire Windows.old folder from its root.

Effecting the Cleanup

So instead, I navigated into this directory structure as far as the file system would let me go, and used an admin command prompt and the rmdir (remove directory) command to work my way up from the bottom of the path to the top. I could only navigate as far as Local before the actual file structure petered out. Working my way up from Local to AppData to Username (using my real account name, of course), to Users to Windows.old did the trick this time. If I’d had a working recovery environment, I could have simply booted that instead, and deleted the Windows.old folder from the root. But because I didn’t, backing out with rmdir at each step of the way did the trick.

As for $GetCurrent? It resisted my deletion not one bit. I was able to remove the 200K or so of files and the folder in a single delete command. Its permissions or file structures weren’t munged, unlike the remaining (if miniscule) Windows.old folders. Nor did the install files stick around, either (that would have been 6 GB or so, not 200 K). And with that, my cleanup was complete!

Here are pointers to some useful links I found while researching these strangely persistent folders:
Cannot Delete LocalState folder (MS.answers)
What Are the $GetCurrent and $SysReset Folders, and Can I Delete Them? (HowToGeek)
Delete Windows.old (TenForums Tutorials)

Virtual Desktop
SearchWindowsServer
Close