Computer >> บทช่วยสอนคอมพิวเตอร์ >  >> ระบบ >> Windows

ทำความสะอาดโฟลเดอร์ WinSxS อย่างปลอดภัย: คู่มือครบถ้วนสำหรับพื้นที่จัดเก็บ Windows

ถ้าสแกน C drive หาไฟล์/โฟลเดอร์กินพื้นที่มาก ต้องเจอโฟลเดอร์ใหญ่ผิดปกติชื่อ "WinSxS" มันน่าจะล้างถ้าพื้นที่น้อย แต่รอ! อย่าล้างจนเรียนรู้ว่ามันคืออะไรและล้างอย่างถูกต้องในคู่มือนี้

WinSxS Folder ใน Windows คืออะไร ทำไมกินพื้นที่มาก

ปกติ WinSxS folder โฮสต์ component store files ทั้งหมด กิน 8GB ถึง 12GB ใน C drive Windows component store มีไฟล์ทั้งหมดเกี่ยวกับ updating Windows และ system apps/services มัน ensure คุณมี backup critical system data สำหรับ recovery และ stability

เมื่อจำเป็น component store files ใช้ทำ actions เช่น recover system ตอน boot failure หรือ corruption, roll back drivers และ Windows updates, add roles สำหรับ server manager, รัน programs ใช้ side-by-side assemblies ฯลฯ

ประเภทข้อมูลทั่วไปที่เก็บไว้เพื่อ system stability:

  • Windows updates installation files เพื่อ rollback ภายหลัง รวม version upgrades อาจกลับ Windows 10 หลังอัปเกรด
  • Previous versions ของ drivers เพื่อ roll back ถ้าผิดพลาด
  • Copies ของ essential Windows system files ซ่อม corrupted files เช่น รัน SFC/Scannow
  • .NET Framework (ทุก versions ติดตั้ง) update files เก็บที่นี่
  • Additional language packs บันทึก components เช่น handwriting recognition engines, font components, voices ฯลฯ
  • Optional features เช่น legacy Windows apps หรือ virtualization features (Hyper-V และ WSL) เพิ่มไฟล์ใน WinSxS ตอน activate

ใช้ PC ไปเรื่อยๆ ข้อมูลสะสมใน WinSxS folder เพิ่ม size ข้อมูลในมัน obsolete ตามเวลาเมื่อ updates ใหม่มา Windows basic cleaning folder นี้บ้าง แต่ล้มเหลวบ่อยบน active system นี่คือเหตุควรทำความสะอาดบ้างเพื่อ騰พื้นที่

ดูขนาด WinSxS Folder จริงใน Windows

ก่อนล้าง สำคัญต้องรู้ขนาด WinSxS folder จริง ว่าต้องล้างไหม อาจคิดว่าดู size โฟลเดอร์ WinSxS ยากอะไร ไป C:\Windows right-click WinSxS folder Properties ดู folder size

แต่นั่นไม่ใช่ขนาดจริง

ใน component store หลายไฟล์ใช้ Hard Linking technique Hard-linking ให้ multiple files เข้าถึง same location ได้โดยไม่สร้าง copies ของ location หรือ data ดังนั้นพยายามวัดขนาด WinSxS folder ด้วยวิธีดั้งเดิม มันคิดว่ามี multiple copies ของไฟล์เดียวกันกินพื้นที่ และสะท้อนความต่างใน final size

หาขนาดจริงของ component store ต้องใช้ Deployment Image Servicing and Management (DISM) tool ผ่าน PowerShell

พิมพ์ "powershell" ใน Windows Search right-click Windows PowerShell เลือก Run as administrator

ใน PowerShell รันคำสั่ง:

dism.exe /Online /Cleanup-Image /AnalyzeComponentStore

รันทันที Windows สแกน component store สร้าง breakdown พื้นที่ใช้ ตัวที่หาคือ Actual Size of the Component Store กรณีผม actual size 9.98GB Windows บอกว่าควร cleanup component store หรือไม่

ทำความสะอาด WinSxS Folder ใน Windows

ถ้า Windows แนะนำ clean component store ทำได้ด้วยคำสั่งอีกตัว ถ้าไม่แนะนำ = Windows ทำแล้ว ไม่ต้องทำอะไร (เว้นแต่อยาก full reset)

เปิด PowerShell admin อีกครั้ง รันคำสั่ง clean WinSxS folder:

dism.exe /online /Cleanup-Image /StartComponentCleanup

Action นี้เริ่ม cleanup process ใช้เวลาบ้าง clean component store เสร็จ ปิด PowerShell restart system กรณีผม clean ประมาณ 3.3 GB

มีอีกคำสั่ง "nuclear" cleanup สำหรับ WinSxS folder ลบ update components ทั้งหมด เก็บ current system files เป็น backup files แม้ลดขนาด WinSxS folder มาก แต่ลบความสามารถ rollback system changes, รัน recovery tools, และ fix system corruption ถ้าอะไรผิดใน current setup

ถ้าอยาก full reset WinSxS folder ใน Windows รันใน PowerShell:

Dism.exe /Online /Cleanup-Image /StartComponentCleanup /ResetBase

ควรเช็คขนาด WinSxS folder ทุกไม่กี่เดือน Windows มักล้มเหลว clean อัตโนมัติ เพราะ requirements รัน cleanup task เข้มงวด ถ้าล้าง WinSxS เพราะพื้นที่น้อย ต้องเช็ควิธี騰พื้นที่ C drive หรือได้พื้นที่มากขึ้นโดยไม่ลบอะไร