การลบไฟล์ขยะ ใน ubuntu หรือ Linux ตระกูล Debian

การลบไฟล์ขยะในที่นี้คือ ขยะที่เกิดจากติดตั้งแพกเกจ หรือ ขยะที่เกิดจากแพกเกจที่ไม่ได้ใช้งาน (มีอยู่ก็ไม่ได้ใช้งาน ไม่ก่อประโยชน์ รกเครื่อง) มีวิธีการง่าย ๆ ดังนี้

*** คำสั่งต่อไปนี้ทำใน terminal ***

First command is the package autoclean.  What autoclean does is remove partial packages from the system.  To use autoclean type the following command in a terminal:

sudo apt-get autoclean

Then enact the package clean command.  What this commnad does is to clean remove .deb packages that apt caches when you install/update programs.  To use the clean command type the following in a terminal window:

sudo apt-get clean

You can then use the autoremove command.  What the autoremove command does is to remove packages installed as dependencies after the original package is removed from the system.  To use autoremove tye the following in a terminal window:


sudo apt-get autoremove

Next step is to install the gtkOrphan GUI.  What gtkorphan does is to find packages that were once used but no longer have any purpose.  Be careful as to not remove the Gstreamer packages as they are for mp3 encoder/decoding and DVD playback.  Do not remove them.  To install gtkOrphan type the following in a terminal windowt:

sudo apt-get install gtkorphan

You will then be able to use gtkOrphan by going to System--->Administraion--->Remove orphaned packages.  It is pretty self-explanatory.  After you have completed the recommendations of this article you should have a slick clean Ubuntu OS.