Hard drive filling up - empty /tmp ?

I’ve noticed that when I run:

davek@linux-kw2x:~> df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 20641788 8427780 11165368 44% /
udev 961204 192 961012 1% /dev
/dev/sda3 217642344 4037944 202548468 2% /home
davek@linux-kw2x:~>

I have 44% used. It should be much smaller, under 10%. How do I empty the /tmp file or other file to free up space?

The contents of /tmp are usually deleted when you reboot.
Looking at the disk usage for / though, you have enough disk space without having to worry (only 44% used).

Not necessarily, sometimes when I reboot I still had /tmp pretty darn full.
I wish there was a dumper of some kind for it, other then going into a root terminal and using commandline.

This will clean out /tmp. Don’t make any typos.

sudo rm -Rf /tmp/*

Yeh simple enough yes, though I do wish there was a GUI frontend for beginners.

The usual way actually is removing the content of /tmp while booting (which is not default on SuSE).

I’m sure this is common knowledge, but anyway:

Open /etc/sysconfig/cron, search for a line saying

CLEAR_TMP_DIRS_AT_BOOTUP="no"

…and edit “no” to “yes”. This could also be done via GUI: YaST → “Editor for /etc/sysconfig”.

but it was under 10% last week when I used opensuse the last time. I have run this command on my Mandriva PC for cleaning out /tmp file.

logout with ALT+CTRL F1
$ rm -fr /home/davek/tmp/*
then login with ALT+CTRL F7

will that work in openSUSE?

Yeh simple enough yes, though I do wish there was a GUI frontend for beginners.

How quaint, a GUI for emptying a directory? What about Nautilus File Manager?

will that work in openSUSE?

See my post for a more convenient way.

that helped…

davek@linux-kw2x:~> df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 20641788 3922156 15670992 21% /
udev 961204 192 961012 1% /dev
/dev/sda3 217642344 4039572 202546840 2% /home
davek@linux-kw2x:~>

I wonder if there’s some other file that files up? I don’t use this hard drive that much, but I’m starting to like openSuse. So more space should be freed up.

/tmp will never be completely empty. It depends on what processes are running when you start up and what data they write to /tmp.
The only way you will have a ‘small’ is running a terminal login with very few services running.
Remember, while you are running, things like browsing the internet stores data in /tmp and is probably the biggest culprit.