Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Because of a low-graphics error I am not able to log into my system anymore. Well .. I am not seeing any graphical interface (solutions here How to fix "The system is running in low-graphics mode" error? have been tried).

df -h revealed that my /dev/sda6 partition is full:

Filesystem Size Used Avail Use% Mounted on
/dev/sda6 7.4G 6.6G 398M 95% /
udev 1.9G 4.0K 1.9G 1% /dev
tmpfs 762M 424K 762M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 1.9G 0 1.9G 0% /run/shm
overflow 1.0M 4.0K 1020K 1% /tmp
/dev/sda7 449G 266G 161G 63% /home
/dev/sda1 447M 115M 308M 28% /boot


sudo du -kxa / | sort -nr | head leads to the output sort: write failed: /tmp/sortXXXXXX (X = any number or letter): No space left on device.

Therefore my question, how do I clean this /tmp/sortXXXXXX folder or directory with terminal commands and how do I set permission flags for that folder or directory to the standard value? I assume I messed up this permissions and now every process is writing to tmp.

Thank you!

share|improve this question
Please add the output of df -h to your question. – Florian Diesch Feb 9 '13 at 16:19
Added df -h output. – Stockfisch Feb 9 '13 at 16:30

Your problems it isn't the /tmp, your problem is the full partition.

The sort command use a file to store temporal data, you haven't space to do it.

Try to make some space deleting old logs:

sudo find /var/log/ -name "*.gz" -exec rm -v {} \; 
sudo find /var/log/ -name "*.0" -exec rm -v {} \; 
sudo find /var/log/ -name "*.1" -exec rm -v {} \;

You can do more space cleaning the apt cached files: sudo apt-get clean sudo apt-get autoclean

share|improve this answer
Thanks! Did that. The first command deleted quite some files but still; sudo du -kxa / | sort -nr | head gives me sort: write failed: /tmp/sortGA4Fww: No space left on device. How may I see what exactly is taking up the space there? – Stockfisch Feb 9 '13 at 16:33
Can you check if you have space with the command?: "df -h" Did you have /tmp mounted at other filesystem. Can you copy and paste the output of the comand "mount" and "df -h" – xkill Feb 9 '13 at 16:44
As /tmp is on its own partition deleting those files in /var/ doesn't help. – Florian Diesch Feb 9 '13 at 16:52

You have /tmp as virtual RAM disk, disable it by editing the file /etc/fstab and comment or remove the line that start with /tmp. Reboot your computer.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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