Clearing files

I’m lost! Since my little episode when I was brain dead for about 35 minutes my memory is somewhat defunctive.
My other PC has ground to a halt as the tmp file is full: “/tmp out of disk space” & “KDE unable to start”. I have scoured commands and can’t find how to clear all the junk apart from move it somewhere else which seems a bit silly. Help! :’(

The following command will delete everything in /tmp:

su -c 'rm -R /tmp/*'

At your own risk!

It wouldn’t be a bad idea to do this on a reboot. This will end any processes using files in /tmp.

  • boot in runlevel 1 (append 1 in boot options line at Grub menu screen)
  • log in with root password
  • type the following:
cd /etc/sysconfig
cp cron cron.bak
sed -i '/CLEAR_TMP_DIRS_AT_BOOTUP/s/no/yes/' cron
  • reboot
shutdown -r now

One can also achieve this by adding “3” at the boot options line, at console login prompt login with username and password, then do “su -c yast”. Once in Yast, go to System - Sysconfigeditor, search for TMP, and set the TMP dirs to be cleared at each boot.

Thanks all! I am having to write all down these days - will keep these tips.