1

Yesterday I was trying to recover some lost files from an external drive using r-linux. I think this filled my laptop's hard drive and my computer suddenly crashed and went into low graphics mode which doesn't let me log in at all.

I searched on here about low graphics mode and confirmed that full disk is one of the reasons.

Following the advice I managed to get to a VT and run the commands

  sudo apt-get install --reinstall ubuntu-desktop
  sudo reboot

But they didn't help. Then I managed to do the command

  df -h 

and this showed me a table, which shows I have no space.

That's where I am stuck, I can't out figure how to delete things. I tried the command

sudo du -kxa / | sort -nr | head 

but it doesn't work.

How can I find the contents I want to delete and then how to actually select the big/not important ones and delete them through the commands?

df -h returns

 filesystem  size  used  avail  use%  Mounted on
 dev/sda1    455gb 449g  0      100%  /
 udev        2,0G  4,0K  2,0G   1%    /dev
 tmpfs       806M   820K 805M   1%   /run
 none        5,0M     0  5,0M   0%   /run/lock
 none        2,0G     0  2,0G   0%   /run/shm
 none        100M  8,0K  100M   1%   /run/user
 overflow    1,0M  4,0K  1020K  1%   /tmp
  • Why is sudo du -kxa / | sort -nr | head not working? It must do something. – Karl Richter Jun 20 '15 at 11:12
  • You can delete files from a terminal using the rm command. For more information execute man rm. – s3lph Jun 20 '15 at 11:13
  • Please show us the output of df -h. Basically, you need to use rm to delete files but we can't tell you which ones unless you give us more details. The sudo du -kxa / | sort -nr | head might not work if you have no space left. Try sudo du -ch / | grep -P '^\d+G' instead. That should give you a list of files/dirs whose size is in the gigabytes. They should serve as a starting point. Since there's no sorting, that is likely to run with no errors. Post the output here and we'll what we can do. – terdon Jun 20 '15 at 11:38
  • Hi. thank you for getting back to me. I am still stuck so let me try to copy what i see on the screen after I do the df -H filesystem size used avail use% Mounted on – Nancy K. Jun 20 '15 at 11:45
  • sorry, I run out of time this is it Hi. thank you for getting back to me. I am still stuck so let me try to copy what i see on the screen after I do the df -H filesystem size used avail use% Mounted on dev/sda1 455gb 449g 0 100% / udev 2,0G 4,0K 2,0G 1% /dev tmpfs 806M 820K 805M 1% /run none 5,0M 0 5,0M 0% /run/lock none 2,0G 0 2,0G 0% /run/user none 100M 8,0K 100M 1% /run/user overflow 1,0M 4,0K 1020K 1% /tmp – Nancy K. Jun 20 '15 at 11:53
2

You need to delete some files. The best place to search is in your home directory. Most likely in your ~/Videos folder. So, from the command line (Ctrl Alt F1) first run this:

cd ~/Videos

Then, look at what you have there. This command will show you the files ordered by size:

ls -lSr

Now, remove some of the bigger files:

rm "video file name.avi"

Once you have removed enough files, restart your computer and you can continue the cleanup using the GUI.

  • Thank you Terdon and everyone here! This solved the issue! I could never have done it without you! (now going to open a bottle of wine and celebrating my initiation in the amazing community of Ask Ubuntu!!) – Nancy K. Jun 20 '15 at 14:51
  • are you around? prospathisa na sou steilo minima sto chat mas alla einai frozen. Psaxno texniko na me voithisei se kati kai ithela na rotiso esena, an mporeis @terdon – Nancy K. Aug 11 '15 at 14:24
  • @NancyK. Sorry, holidays. I'm not at my computer and won't be for most of August. :( – terdon Aug 12 '15 at 10:23
  • kala na peraseis, sygnomi gia tin enoxlisi, tha vro texniko apo to internet, kales diakopes! @terdon – Nancy K. Aug 12 '15 at 20:22

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.