Find the answer to your Linux question:
Results 1 to 4 of 4
Suddenly my root partition is showing 100% full. Been using the computer all day and until now it gave me a message saying my root partition is 100% full. I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jan 2013
    Posts
    47

    Root partition is showing full, how do I clean it?


    Suddenly my root partition is showing 100% full. Been using the computer all day and until now it gave me a message saying my root partition is 100% full. I think it happened when I ejected a USB and then some error came up. The message popped up shortly after, but I am not sure.

    Code:
    root@localhost /# df
    Filesystem     1K-blocks     Used Available Use% Mounted on
    /dev/sda5       30832636 30530776         0 100% /
    devtmpfs         4024212        0   4024212   0% /dev
    tmpfs            4030536      788   4029748   1% /dev/shm
    tmpfs            4030536     1012   4029524   1% /run
    tmpfs            4030536        0   4030536   0% /sys/fs/cgroup
    tmpfs            4030536      268   4030268   1% /tmp
    /dev/sda1         303104    52268    250836  18% /boot/efi
    /dev/sda7      689506520 26125804 628332732   4% /home
    In the screens below /var is taking 25GB

    var.jpg

    An here I can see that /var/log/journal is the maybe the culprit, although is only showing 11MB

    journal.jpg

    This is the content for that directory

    Code:
    root@localhost /# ls -l /var/log/journal/7725dfc225d14958a625ddaaaea5962b/
    total 11148
    -rw-r-----+ 1 root systemd-journal 3796992 Sep  5 19:50 system.journal
    -rw-r-----+ 1 root systemd-journal 3862528 Sep  5 19:50 user-1000.journal
    -rw-r-----+ 1 root systemd-journal 3735552 Sep  5 19:31 user-42.journal
    Is it safe to delete these files? under /var/log/journal/7725dfc225d14958a625ddaaaea5962b/ ?

    Or what else can I do?

    Thanks


    Edit:

    I just deleted /var/log/journal/* and is still showing /var/log is still showing 25GB. What else is safe to delete here?

    Code:
    root@localhost log# ls -lrt
    total 24625040
    drwx------. 2 root   root          4096 Mar 20 06:29 speech-dispatcher
    -rw-------. 1 root   root             0 Jun 27 12:11 tallylog
    drwxr-xr-x. 3 root   root          4096 Jun 27 12:12 pluto
    drwxr-xr-x. 2 root   root          4096 Jun 27 12:13 mail
    drwxrwxr-x. 2 root   root          4096 Jul 26 21:14 anaconda
    -r--------. 1 root   root         78632 Jul 26 21:47 dracut.log-20130727
    drwxr-xr-x. 2 root   root          4096 Jul 27 15:07 prelink
    -rw-r--r--. 1 root   root          1081 Jul 27 17:20 fedorautils.log
    drwx------. 2 root   root          4096 Aug  1 08:23 ppp
    drwx------. 6 root   root          4096 Aug  1 18:41 libvirt
    -rw-------. 1 root   root             0 Aug  5 20:14 spooler-20130811
    drwxr-xr-x. 2 root   root          4096 Aug  6 06:00 glusterfs
    drwxr-x---. 2 root   root          4096 Aug  8 06:49 sssd
    drwxr-xr-x. 2 chrony chrony        4096 Aug  9 04:04 chrony
    -rw-------. 1 root   root           358 Aug 10 12:34 maillog-20130811
    -rw-------. 1 root   root          7876 Aug 11 12:50 secure-20130811
    -rw-------. 1 root   root      18096383 Aug 11 13:51 messages-20130811
    -rw-r--r--. 1 root   root         11427 Aug 11 14:12 cron-20130811
    -rw-------. 1 root   root             0 Aug 11 14:12 spooler-20130819
    -rw-r--r--. 1 root   root         44722 Aug 12 09:46 wpa_supplicant.log-20130810
    drwxr-x---. 2 root   root          4096 Aug 18 20:11 audit
    drwxr-xr-x. 2 root   root          4096 Aug 19 08:26 cluster
    -rw-------. 1 root   root         37062 Aug 19 08:49 dracut.log-20130819
    -rw-------. 1 root   root          3034 Aug 19 09:03 maillog-20130819
    -rw-------. 1 root   root         27154 Aug 19 11:16 secure-20130819
    -rw-------. 1 root   root      67989877 Aug 19 11:16 messages-20130819
    -rw-r--r--. 1 root   root         18810 Aug 19 11:17 cron-20130819
    -rw-------. 1 root   root             0 Aug 19 11:17 spooler-20130825
    drwx------. 3 root   root          4096 Aug 20 08:55 samba
    -rw-------. 1 root   root         33442 Aug 20 22:26 wpa_supplicant.log-20130820
    -rw-------. 1 root   root          2135 Aug 23 18:02 maillog-20130825
    -rw-------. 1 root   root         20282 Aug 25 13:04 secure-20130825
    -rw-------. 1 root   root      97843868 Aug 25 15:01 messages-20130825
    -rw-------. 1 root   root             0 Aug 25 15:22 spooler-20130901
    -rw-r--r--. 1 root   root         20257 Aug 25 15:22 cron-20130825
    -rw-------. 1 root   utmp          8064 Aug 30 20:18 btmp-20130901
    -rw-------. 1 root   root          1253 Aug 31 19:35 maillog-20130901
    -rw-------. 1 root   root         14914 Sep  1 13:07 secure-20130901
    -rw-------. 1 root   root      95397256 Sep  1 13:11 messages-20130901
    -rw-r--r--. 1 root   root         13822 Sep  1 13:11 cron-20130901
    drwxr-xr-x. 2 lp     sys           4096 Sep  1 13:11 cups
    -rw-------. 1 root   root             0 Sep  1 13:11 spooler
    -rw-------. 1 root   root         41042 Sep  3 08:42 wpa_supplicant.log-20130901
    -rw-------. 1 root   root         19563 Sep  4 08:01 grubby
    -rw-------. 1 root   root         18456 Sep  4 08:01 dracut.log
    -rw-------. 1 root   root         84592 Sep  5 08:29 yum.log
    -rw-------. 1 root   utmp           768 Sep  5 10:34 btmp
    -rw-r--r--. 1 root   root         42723 Sep  5 19:09 Xorg.0.log.old
    -rw-r--r--. 1 root   root         10006 Sep  5 19:09 boot.log
    drwx--x--x. 2 root   gdm           4096 Sep  5 19:09 gdm
    -rw-------. 1 root   root          1817 Sep  5 19:10 maillog
    -rw-------. 1 root   root         16164 Sep  5 19:10 wpa_supplicant.log
    -rw-r--r--. 1 root   root             0 Sep  5 19:10 pm-powersave.log
    -rw-r--r--. 1 root   root          6850 Sep  5 19:10 spice-vdagent.log
    -rw-r--r--. 1 root   root         41860 Sep  5 19:48 Xorg.0.log
    -rw-rw-r--. 1 root   utmp        187776 Sep  5 19:50 wtmp
    -rw-------. 1 root   root         12301 Sep  5 19:50 secure
    -rw-r--r--. 1 root   root        292292 Sep  5 19:50 lastlog
    -rw-r--r--. 1 root   root         16533 Sep  5 20:01 cron
    drwxr-xr-x+ 2 root   root          4096 Sep  5 20:13 journal
    -rw-------. 1 root   root   24935283391 Sep  5 20:13 messages

    Edit again

    I was able to bring it down to 21%

    Code:
    esausilva@localhost ~$ df
    Filesystem     1K-blocks     Used Available Use% Mounted on
    /dev/sda5       30832636  5896132  23347256  21% /
    devtmpfs         4024212        0   4024212   0% /dev
    tmpfs            4030536       92   4030444   1% /dev/shm
    tmpfs            4030536     1004   4029532   1% /run
    tmpfs            4030536        0   4030536   0% /sys/fs/cgroup
    tmpfs            4030536       20   4030516   1% /tmp
    /dev/sda1         303104    52268    250836  18% /boot/efi
    /dev/sda7      689506520 26151224 628307312   4% /home
    I deleted all the files from /var/log, /var/tmp, and /tmp ... bunch of old files. Is there a way for the system to do this automatically, I mean in the system settings, not writing a script??

    Thanks
    Last edited by jgezau; 09-06-2013 at 01:37 AM.

  2. #2
    Linux Enthusiast
    Join Date
    Jan 2005
    Location
    Saint Paul, MN
    Posts
    661
    Have "/tmp" erased on boot (look into your "init" configuration options). Look into using "logrotate" for log file management. Basicly, when creating a temporary file, you are responsible to remove it.

  3. #3
    Just Joined!
    Join Date
    Nov 2007
    Posts
    61
    Quote Originally Posted by jgezau View Post
    Suddenly my root partition is showing 100% full. Been using the computer all day and until now it gave me a message saying my root partition is 100% full. I think it happened when I ejected a USB and then some error came up. The message popped up shortly after, but I am not sure.

    Code:
    root@localhost /# df
    Filesystem     1K-blocks     Used Available Use% Mounted on
    /dev/sda5       30832636 30530776         0 100% /
    devtmpfs         4024212        0   4024212   0% /dev
    tmpfs            4030536      788   4029748   1% /dev/shm
    tmpfs            4030536     1012   4029524   1% /run
    tmpfs            4030536        0   4030536   0% /sys/fs/cgroup
    tmpfs            4030536      268   4030268   1% /tmp
    /dev/sda1         303104    52268    250836  18% /boot/efi
    /dev/sda7      689506520 26125804 628332732   4% /home
    In the screens below /var is taking 25GB


    I deleted all the files from /var/log, /var/tmp, and /tmp ... bunch of old files. Is there a way for the system to do this automatically, I mean in the system settings, not writing a script??

    Thanks
    If you had only been running for a day, then something is logging errors and filling /var You should find out what it is. Are you using KDE by any chance? If so, the usual suspect is Neponuk/virtuoso and their friends. If you prefer GUI solutions, get a little KDE app called kdirstat, it shows disk use in a very nice pictorial form.
    I believe that there is a gnome app called Baobab which does similar.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined!
    Join Date
    Jan 2013
    Posts
    47
    Quote Originally Posted by Wakou View Post
    If you had only been running for a day, then something is logging errors and filling /var You should find out what it is. Are you using KDE by any chance? If so, the usual suspect is Neponuk/virtuoso and their friends. If you prefer GUI solutions, get a little KDE app called kdirstat, it shows disk use in a very nice pictorial form.
    I believe that there is a gnome app called Baobab which does similar.
    I'm running Gnome, the screenshots in my post are from baobab.

    When I turned off my computer I got a bunch of errors on the screen. Then I found our they were logged on under /var in a 24GB file. This sucker file was filling my root, and while at it, I deleted all log files and temp files

    Sent from my Galaxy Nexus using Tapatalk 4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •