Low disk space in root partition even after moving some large files to another partition

praveen2654

New Member
Joined
Nov 7, 2019
Messages
7
Reaction score
2
Credits
0
Hello,

I really appreciate if you could help me with the issue I faced similar to this. Recently, I cut pasted around 5GB files from anaconda /pkgs folder in root partition to another partition (this is a partition I am using in windows and I wanted to backup those anaconda packages). But moving did not free up space in root. For df -h and df -T (for filesystems) commands I get the following. I am using Ubuntu 18.04.2 LTS on an HP laptop. Following another thread, I believe I did the kernel image removal correctly but it did not have a huge impact.

Thank you!

4640


4641
 


Hello,

I guess you used a file browser to cut/paste.
Did you check the trash bin, in case you packages were put there by your file browser ?
 
Hello,

Yes I did use the file browser. And I cannot find anything in the trash.

Thanks
 
You can use the find command to find the files that are taking up the space.. try something like this to find files over 1 gig:
Bash:
find / -size +1G

That will start at the / and go down. Since we're starting at / it will also show large files in other partitions, but you should be able to track them down pretty quickly. If you want to ignore certain partitions of folders you can do something like:
Bash:
find / -path /path/to/ignore -prune -o -size +1G

Once you find them, use the terminal to remove them like:
Bash:
rm -r /path/to/the/big/file
 
Following another thread, I believe I did the kernel image removal correctly but it did not have a huge impact.
Well, maybe you didn't remove excess kernels after all. Take a look with ls /boot and tell us what you see.

I'm struck by how many partitions you seem to have, up to /dev/sda11. I realize you also have Windows installed, but 11 still seems like a lot. I'm also quite curious about two partitions near the bottom, sda6 and sda11 that are both mounted to /media. Are these external hard drives? And sda6 shows a fuseblk file system which makes me think it might be a NTFS formatted external drive. Also, sda6 is very nearly full... I think it's a bad idea to fill a drive above about 90% capacity, but maybe I'm over cautious. Anyway, just talking out loud and pondering your system.

When I mount an external drive, I get a different drive letter, see my screenshot below before and after mounting what turns into sdf1. If yours are external and mounting to sda... I'm wondering about that.

You might try unplugging any external hard drives, rebooting, and checking with df -h again to see if there are any size changes in your / partition (sda9).


df.png
 
Don't know if I am stating the bleeding obvious here, so I'll state it anyway and risk wearing egg on my face (love egg)

G'day @praveen2654 and welcome to linux.org :)

If you are using the default Ubuntu, which is GNOME desktop environment (DE) then you are using Nautilus aka Files as a File Manager.

Nautilus does not have the ability to provide a second pane, so you were likely right-clicking your Folders and/or Files and choosing Move, then moving to Windows to drop them.

Windows would likely show as OS on Linux.

When you use the Move option to move files from one partition to another, or from one drive to another, it does not Move them, it copies them. Same applies in Windows.

The originals are left in place at the source end.

To move them, you need to do one of two things:
  1. Identify the source files and then choose Cut, then
  2. Move to the target (Windows) and choose Paste
OR
  1. Identify the source files in one instance of Nautilus, then open a 2nd instance of Nautilus and
  2. Hold down the Shift key and use the mouse to drag and drop to the destination.
In either scenario, you can check your Trash after to see if it needs emptying, but I doubt it.

Cheers

Chris Turner
wizardfromoz
 
Thank you all for the replies. I found some files using 'find' command. But the strange thing is, I get two remaining space values from disk usage analyzer and 'df -h'. I have attached the disk analyzer's output and kernel 'ls /boot' output.

Thank you..

4651


4652
 
Not excessive kernels taking up space... that's good. But something is.

I'd still like to see what happens if you unplug both external drives, reboot, and run df -h again... if the output shows anything different. It's just a guess, but I'm curious if you have a configuration problem with fstab or something.
 
sda6 is a windows partition and sda11 is a root partition that I used with ubuntu 16 before upgrading to 18.04. So after unmounting those, I get the following for df -h. In this image, root has some space left as I took this just after a reboot.

Thanks!

4654
 

Attachments

  • 1573681161563.png
    1573681161563.png
    71.9 KB · Views: 638
Well, of course I hoped to see a bigger increase of available space. Oh well.

Your root partition ( / ) is only 41 GB. Let's start finding out who's hiding all that data since we know it isn't a bunch of kernels. Try this command and show us the output:
Code:
sudo du -hsx /* | sort -rh | head -n 40
 
Morning Stan :)

5:40 AM in Colombo (Sri Lanka) and Delhi (India) if Praveen is from the Aryan Sub-Continent, may be a while until we get a response.

Subject to what his running of space hogs command is, I'd like to take a look at

Code:
du -ah /var/cache/apt/archives

#and

du -ah /var/log/journal

c u around

Wiz
 
The command I gave above will point to /var if that is the culprit. From there we can drill down further (and it is certainly a likely suspect). But as I've pondered this more and more, I'm also wondering a lot about /home. There did not seem to be a separate partition for /home.... and only 41 GB for the whole system seems like it may be too small for things added and installed since he upgraded to 18.04.
 
Yeah I am from an Aryan country but your time zone is a bit familiar for me :). And yes I don't have a seperate partition for /home. Maybe I wanted to use the home partition (I mistakenly called root partition previously) from the previous ubuntu installation. But it has not worked like that and I never noticed that until you pointed out @atanere. So there few files in /var/journal. Do you think these files are causing the remaining space mismatch?

Cheers

du -ah /var/log/journal output

4659


4657


4658
 
Last edited:
But the strange thing is, I get two remaining space values from disk usage analyzer and 'df -h'. I have attached the disk analyzer's output and kernel 'ls /boot' output.
Not to worry about this... it is not a "mismatch" as you think. Different programs evaluate hard disk space in different ways, and that results in the values being slightly different. This isn't a problem at all.


sda11 is a root partition that I used with ubuntu 16 before upgrading to 18.04
I may be wrong, but I don't think you "upgraded" your Ubuntu... I think you installed a fresh new copy of 18.04. In your first screenshot, you show sda11 as 151 GB partition (75% full). That's a nice normal size partition for an operating system, and 75% full is not at a critical level. But sda11 was not needed for your 18.04 because you were able to unmount it and reboot without it.

So, your entire Ubuntu 18.04 is stored in sda9 which is only 41 GB (100% full). I'm using the df -h numbers. The last screenshot shows all the file system hierarchy for a complete Linux system (/, /bin, /boot, /home, /sbin, /usr, /var.... everything). The output I asked for shows that /home (18G), /usr (14G), and /var (5.1G) are consuming 37 GB out of your total available of 41 GB. I'd guess that /home is normal and not really a problem, but /usr and /var both seem unusually large, especially for such a small partition footprint.

Your long term reality is that you need to either expand sda9 so that your 18.04 can grow, if that is possible, or you will need to do a full reinstall.... perhaps into sda11, and replace Ubuntu 16. I don't think that 41 GB is going to be acceptable to you for very long. Or if it is, you will need to be very careful to keep from repeatedly filling it up again.

The short term reality is that you can clean up some space to give yourself some breathing room while you decide what to do. First off, delete anything not needed in your Downloads folder. It's very easy to let stuff build up in there... I know, my Downloads folder has over 24 GB in it right now! :eek: After deleting anything, be sure to empty the Trash folder, and keep it empty. If you have files in Pictures, Videos, Music, etc... move them out to save space. Uninstall programs that you don't really need... you have probably installed quite a few already. Delete the cache for Firefox and any other web browser you may have.

Some /var/log files should not be deleted, but the ones in your screenshot are probably safe. I don't think there are two separate things with 801M... I think you are seeing a "total" that is repeated on the last two lines. It's not a lot, but it will help. This link (and this link) are what is telling me this is safe for you, but to fit your situation, you need to include the long sub-folder name after /var/log/journal/ --- so I think this command will save you 801M:
Code:
sudo rm /var/log/journal/33e790fffdf54a7a91a2bf975cc2f837/*


If you want to try to "expand" your sda9, @wizardfromoz may can guide you there. He is practically "magical" in his ability to work with partitions. But I'm sure he will warn you of the risks in doing this too. You should always backup important data before resizing partitions... failure is not fun.

And Wizard may offer some more/better ideas about cleaning up what you have now as well.

Cheers
 
Here are my two cents :
It might be better than erasing files
 
Hi, Thank you all for your support. As you suggested I am going to repartition after backing up data. I ordered an external disk too. :D Cheers!
 

Staff online

Members online


Top