วิธีลบไฟล์ขยะ (Temporary Files) ในคอมพิวเตอร์
Back to articles

วิธีลบไฟล์ขยะ (Temporary Files) ในคอมพิวเตอร์

วิธีลบไฟล์ขยะ (Temporary Files) ในคอมพิวเตอร์

Universal Updated: February 16, 2026

วิธีลบไฟล์ขยะ (Temporary Files) ในระบบปฏิบัติการต่าง ๆ

ไฟล์ขยะหรือ temporary files เป็นไฟล์ที่สร้างขึ้นจากการใช้งานและการทำงานต่าง ๆ บนระบบปฏิบัติการ การลบไฟล์ขยะเป็นขั้นตอนสำคัญในการรักษาประสิทธิภาพและพื้นที่บนฮาร์ดดิสก์ของคอมพิวเตอร์ของคุณ ดังนี้เป็นขั้นตอนที่คุณสามารถทำได้บนระบบปฏิบัติการต่าง ๆ:

บน Windows:

  1. Disk Cleanup:
- พิมพ์ "Disk Cleanup" ในกล่องค้นหา Windows.
- เลือกไดรฟ์ที่ต้องการทำความสะอาด (เช่น C:).
- เลือกประเภทของไฟล์ที่คุณต้องการลบ เช่น Temporary files, Recycle Bin, System files ฯลฯ
- คลิก "OK" และติ๊กเครื่องหมายยอมรับเพื่อยืนยัน.

บน macOS:

  1. Optimize Storage:
- เปิด System Preferences และคลิกที่ "Apple ID" หรือ "iCloud."
- เลือก "Manage" เพื่อจัดการพื้นที่จัดเก็บข้อมูลบน Mac ของคุณ.
- ในแท็บ "Recommendations" หากมีคำแนะนำ "Optimize Storage" ให้คลิกเพื่อดำเนินการตามคำแนะนำ.

บน Linux:

  1. ใช้คำสั่ง Terminal:
- ใช้คำสั่ง sudo rm -r /tmp/* เพื่อลบไฟล์ขยะทั้งหมดใน /tmp.
- ใช้คำสั่ง sudo find /var/log -name "*.log" -type f -exec rm {} \; เพื่อลบไฟล์ log ขยะใน /var/log.

  1. ใช้เครื่องมือ Third-Party:
- ติดตั้งเครื่องมือที่ช่วยในการลบไฟล์ขยะ ตัวอย่างเช่น bleachbit.

คำเตือน:

  • การลบไฟล์ขยะควรระมัดระวัง เนื่องจากอาจส่งผลกระทบต่อระบบการทำงาน แนะนำให้สำรองข้อมูลสำคัญก่อนที่จะดำเนินการ.

  • ในการใช้โปรแกรม third-party ควรเลือกใช้แหล่งที่น่าเชื่อถือ.

การลบไฟล์ขยะจะช่วยเพิ่มประสิทธิภาพและประหยัดพื้นที่บนฮาร์ดดิสก์ของคอมพิวเตอร์ของคุณ ควรทำการลบไฟล์ขยะเป็นระยะ ๆ เพื่อให้ระบบปฏิบัติการทำงานได้ดีและมีประสิทธิภาพสูงสุด.

D

DriteStudio | ไดรท์สตูดิโอ

Cloud, VPS, Hosting and Colocation provider in Thailand

Operated by Craft Intertech (Thailand) Co., Ltd.

Manage your cookie settings

We use different types of cookies to optimize your experience on our website. Click on the categories below to learn more and customize your preferences. Note that blocking some types of cookies may impact your experience.

Necessary Cookies

These cookies are essential for the website to function properly. They enable basic functions like page navigation and access to secure areas.

View cookies used
  • Session cookies (session management)
  • Security cookies (CSRF protection)
Always On

Functional Cookies

These cookies enable personalized features like language preferences and theme settings. Without these, some features may not work properly.

View cookies used
  • lang (language preference)
  • theme (dark/light mode)

Analytics Cookies

These cookies help us understand how visitors interact with our website by collecting and reporting information anonymously.

View cookies used
  • _ga (Google Analytics)
  • _gid (Google Analytics)

Marketing Cookies

These cookies are used to track visitors across websites to display relevant advertisements based on your interests.

View cookies used
  • Advertising cookies
  • Remarketing pixels

Privacy Policy