I had been running Ubuntu 14.04 for about a month without problems but when a program crashed (FlashGraphs if that is important) the computer froze, and I restarted. When I tried to log back in, after entering my password, the screen freezes on my background with nothing else showing up. I am able to log in to the guest session, where when I open it, I get the warning that root has 0 bytes remaining. I see that a file that had been created for FlashGraphs within my /var/tmp directory that is extremely large and composes the bulk of my space. The problem is that I don't know a way to delete that file from the guest session and I can't access my account since it freezes before I get to it.

  • 1
    Get to recovery shell, remount / with read-write permission, delete the file, reboot. I'm going to bed so can someone plz post this as an answer ? – Sergiy Kolodyazhnyy Jun 8 '15 at 21:51
  • I used your advice and it solved my problem so whenever you end up seeing this, just copy your comment as an answer and I'll mark it correct – Nimish Todi Jun 8 '15 at 22:04
  • Without going to recovery shell, why not start in console with ctrl+alt+f1 ? you may be able to login there ? – solsTiCe Jun 9 '15 at 15:42

You can clean up spurious large files in recovery mode, which doesn't require you to log in with your normal user account.

  1. Boot your computer in Ubuntu's recovery mode. Mount the file system(s) as described in steps 8 and 9. In particular, mount /var, if it's not part of the root file system. (If you don't know what that means, it probably doesn't apply to you.)

  2. Enter and run the following commands to delete the content of /var/tmp:

    shopt -s dotglob
    rm -r /var/tmp/*

    (If the shell doesn't understand shopt, just leave it and skip to the next command.)

    A more portable alternative would be:

    find /var/tmp -mindepth 1 -delete
  3. Reboot, e. g. with the command


On another note, I'm a bit confused, that the startup scripts don't take care of cleansing /var/tmp during boot. Per the specification, applications mustn't expect anything in there to survive a reboot anyway. Or do these statements only apply to /tmp? Maybe someone can clear that up in the comments or through an edit.

  • 2
    Isn't it /tmp which is automatically cleaned up at boot? I don't think /var/tmp is supposed to be. – Gunnar Hjalmarsson Jun 8 '15 at 23:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.