已经第二次发现了,Windows 10 大版本更新后,用清理工具释放老版本所占据的磁盘空间时,会留下一个比较深的目录,无法删除。它的全路径通常是这样的:
C:\Windows.old\Users\{username}\AppData\Local\Packages\Microsoft.Windows.Cortana_cw5n1h2txyewy\LocalState..
请务必注意最后那两个点,正是无法删除的元凶。之前是如何删除的已经无法想起,今天突发急智,直接把 Ubuntu WSL 子系统打开,
1 2 3 4 5 6 7 8 |
zhang@X230T:~$ cd /mnt/c/Windows.old/Users/zhang/AppData/Local/Packages/Microsoft.Windows.Cortana_cw5n1h2txyewy/ zhang@X230T:/mnt/c/Windows.old/Users/zhang/AppData/Local/Packages/Microsoft.Windows.Cortana_cw5n1h2txyewy$ ls -l total 0 drwxrwxrwx 1 zhang zhang 512 Oct 29 2017 LocalState.. zhang@X230T:/mnt/c/Windows.old/Users/zhang/AppData/Local/Packages/Microsoft.Windows.Cortana_cw5n1h2txyewy$ rmdir LocalState../ zhang@X230T:/mnt/c/Windows.old/Users/zhang/AppData/Local/Packages/Microsoft.Windows.Cortana_cw5n1h2txyewy$ ls -l total 0 zhang@X230T:/mnt/c/Windows.old/Users/zhang/AppData/Local/Packages/Microsoft.Windows.Cortana_cw5n1h2txyewy$ |
显然一举成功。