2

I can't login to my CentOS system because it indicates I'm out of Hard disk space. What can I do to delete some old files?

  • Usually there are many (rather small) files in /tmp which you can delete. But it is a start to be able to login again. – Hauke Laging Nov 1 '14 at 13:56
  • Maybe you can start up in single user mode? You can do that on OS X. – DisplayName Nov 1 '14 at 14:25
  • 1
    Some Unix systems have anticipated this and saved just enough space and other resources for root to log in on the console. You can then delete files as needed. – Thorbjørn Ravn Andersen Nov 1 '14 at 23:27
5

You could boot with a live CD, mount your drive, and clean up some files that way. You could also try rescue mode like DisplayName suggested.

4

You may also be able to switch to a virtual terminal and log in as root to clear up some space.

This assumes that the reserved space for root hasn't been filled up by root-owned files.

To switch to a virtual terminal, press Ctrl+Alt+F2 (for example), log in as root, figure out which file/files can be deleted safely to free up some space and then switch back to your graphical display manager and try logging in again. The graphical display manager should be accessible via Ctrl+Alt+F7, but some distros, like Fedora, put it at Ctrl+Alt+F1.

1

In addition to @JosephR reply.

To prevent such issues in future you need to plan your system layout more effectively.

I would recommend you to use a separate /home partition and a separate partition to store your personal data and files like /data. And in case if you use more addition software other than the one which comes from distro, like VMware, skype, adobe, google-chrome you can keep /opt in a separate partition.

By segregating them into different partition we can avoid / disk getting filled and thus causing these issues.

  • or use ubuntu, which will allow you to log in with full disk anyway – Pavel Niedoba Jul 23 '17 at 20:07

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.