เนื่องจากเครื่อง Automate Build พบปัญหา Disk เต็มครับ หลังจากลดพื้นที่จากส่วนอื่นๆไปแล้ว ผมเข้ามาส่องดูที่ Drive C พบว่า WinSxS Folder ดูมีขนาดใหญ่อยู่ครับ เลยหาทางลดพื้นที่ดูครับ
WinSxS คือ อะไร
- เก็บไฟล์ที่ใช้สำหรับการติดตั้ง Update หรือ Service Pack ใหม่
- เก็บไฟล์ที่ใช้สำหรับการ Rollback Update หรือ Service Pack หากเกิดปัญหา
- เก็บไฟล์ หรือ Component ที่มีหลากหลายเวอร์ชัน โดยตัว Application ที่ได้ใช้ไฟล์ Manifest เพื่อมาอ้างอิงอีกที
ลดขนาด WinSxS Folder
- ตรวจสอบพื้นที่ก่อนแก้ไข โดยใช้ treesize

- ปกติแล้ว เราจะจัดการ WinSxS โดยคำสั่ง
Dism.exe /online /Cleanup-Image
ซึ่งมี Option ให้ใช้งานคร่าวๆ ดังนี้- /AnalyzeComponentStore : ตรวจสอบพื้นที่ที่ใช้งานอยู่
- /StartComponentCleanup : ลบ Component ที่ Windows ไม่ได้ใช้งาน
- /SPSuperseded : Clear พื้นที่ของ Service Pack ที่ติดตั้ง และใช้งานอยู่
- /ResetBase + /StartComponentCleanup : Clear พื้นที่ Update + Service Pack ที่ติดตั้ง และใช้งานอยู่
- NOTE : Option /SPSuperseded กับ /ResetBase + /StartComponentCleanup ถ้า Run คำสั่งไปแล้ว ทำให้ไม่สามารถลบ Update หรือ Service Pack ได้
- เปิด Command Line ด้วยสิทธิ administrator
- คำสั่งที่ผมเลือกใช้ /ResetBase + /StartComponentCleanup
Dism.exe /online /Cleanup-Image /StartComponentCleanup /ResetBase
- ผมเลือก Option /Resetbase ครับ

- ตรวจสอบพื้นที่หลังแก้ไข โดยใช้ treesize อีกครั้ง

Reference
Discover more from naiwaen@DebuggingSoft
Subscribe to get the latest posts sent to your email.