I have a Desktop PC that I rarely use. Today I booted up this PC to do the updates and to organize some folders but reading my conky I saw that the / (root) partition is almost full. I have 23 GB of this and 20 GB are used. These are my partitions: enter image description here

On my lapotop I have the same programs and the same space of root partition but I have got only 4 GB used. How can I solve this problem, I think that is impossible to have 20 GB files in / . Where and what I have to check for solve? thank you

with sudo baobab allow my to see a big file in desktop that I didn't able to see with nothing. Now my root partition, now I have 13 GB used instead of 20. I post 2 pictures with the files that fill the partition. enter image description here

enter image description here

these are the kernel image right? How can I delete them (I remember that some time ago I deleted these files with very bad results)?

  • You can visualise what's taking the space using sudo baobab. May be the cached apt-get packages. Try running sudo apt-get clean and sudo apt-get autoremove. – Ashhar Hasan Dec 5 '15 at 20:41
  • 1
    The following command will help figure out where the space is: du -s /* 2>/dev/null | sort -nr. You may want to add its output to the question for review. – mikewhatever Dec 5 '15 at 20:44
  • @mikewhatever That's slow, but I learned something new. Any way to get it to do its thing based on individual files instead of directories? – Ashhar Hasan Dec 5 '15 at 20:55
  • I edited my answer with new informations – linofex Dec 5 '15 at 21:09

You have way too many kernels and headers installed. I'd recommend removing all, but the most recent. There are several ways to do it, I like this one:

dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | grep -E "(image|headers|modules)" | xargs sudo apt-get -y purge

...explained here

Other then that, I see nothing obviously wrong. What you have on the desktop should add up to the home partition, and not /.

  • Thanks for the command, I deleted all the old kernels, now root partition uses only 5 GB. I don't know why, but under the / partition with sudo baobab command has showed the desktop folder and after clean it the space on root partition was clean. – linofex Dec 5 '15 at 21:44

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.