Cleaning up the Temp Files

Recently I noticed that my /tmp folder is messy. There are so many files and directories that are no longer needed.

I am afraid to remove them by hand, so instead I ask my system to do it by itself automatically.

Here are the steps I took to set my system to clean up the temp files automatically :

  • Start the YaST Control Center
  • Select System
  • Select /etc/sysconfig Editor
  • In the left pane, go to System, Cron
  • Expand the Cron menu by clicking on the “+” symbol
  • And change the following field according to my preferences :
    • CLEAR_TMP_DIRS_AT_BOOTUP : yes (default :no)
    • TMP_DIRS_TO_CLEAR : /tmp (default : /tmp)
    • MAX_DAYS_IN_TMP : 2 (default : 0)
    • LONG_TMP_DIRS_TO_CLEAR : /var/tmp (default:)
    • MAX_DAYS_IN_LONG_TMP : 30 (default: 0)
  • After I am done, I click “Finish“.
  • Reboot the machine to know the effect.

Here is the editor screenshot :

tmp-clearance

Now my /tmp folder is not messy anymore. :D

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s