Hello, everyone. Recently I finally decided to update my system, and right after the update ran into a problem: before update baobab showed ~22 GB avaliable space, and after the update it went down to around 8.
Here's some info, that might be relevant:
df output:
Filesystem 1K-blocks Used Available Use% Mounted on
tmpfs 788700 1976 786724 1% /run
/dev/nvme0n1p8 53050368 48246568 4054792 93% /
tmpfs 3943496 0 3943496 0% /dev/shm
tmpfs 5120 4 5116 1% /run/lock
/dev/nvme0n1p8 53050368 48246568 4054792 93% /home
/dev/nvme0n1p7 998060 133944 795304 15% /boot
/dev/nvme0n1p1 364544 89768 274776 25% /boot/efi
tmpfs 788696 104 788592 1% /run/user/1000
du -h / shows 23G, du -h /home — 13G. Overall I have 54.3G disk space, so (23+13)/54 doesn't add up to 93%
sudo lsof | grep deleted | wc -l shows 8433 deleted files that are still in use.
I also tried booting with liveUSB and running 'check' on partition via GParted.
I did some research online:
- https://forum.manjaro.org/t/baobab-shows-14gb-less-usage-where-is-the-rest/109527 - seems like a similar problem, but does not address huge du/df difference, also doesn't provide solution for me
- https://unix.stackexchange.com/questions/414417/du-not-accounting-for-space-shown-by-df helped me understend difference between du/dh, so I provided output of lsof as suggested.
- a lot of other stackoverflow posts, all having similar answers, that didn't help me
I tried some methods to locate what consumes all the space, but couldn't figure it out. Also, the problem seems to be getting worse (right now baobab shows only ~5GB avaliable space). Can you help me find the source of the problem (and ideally also help me solve it :) )?
9 Comments
Still@programming.dev · 4 pts · 2y
because you've updated be tween releases you may have a large cache of file for apt
you may want to run
sudo apt-get autocleanto remove old files that aren't in the repo (replaced with new versions)apt-cache statswill tell you info about the cacheandnekon@programming.dev · 1 pts · 2y
Running
sudo apt-get autoclean && sudo apt-get autoremovewas the first thing I tried.I am not sure, how do I interpret output of apt-cache stats?
::: spoiler spoiler
:::
JaxNakamura@programming.dev · 2 pts · 2y
A reboot will make whatever processes that are still using those deleted files let go of them. Maybe that solves your problem. If not, ncdu will help you find large files and directories.
andnekon@programming.dev · 1 pts · 2y
I've already tried rebooting (as mentioned in the post, I've run GParted 'check' from liveUSB, reboot after. Also, I've done it seperately). And ncdu shows basically the same result as baobab — it doesn't add up to 93% disk usage from df
slappy@lemmy.blahaj.zone · 2 pts · 2y
andnekon@programming.dev · 1 pts · 2y
I run dual boot windows/ubuntu, nvme0n1p1 is efi system partition, p2-p5 are windows-reserved, and p6 is linux-swap.
Also, I didn't mention it in the post, but I recently grew linux partition up for around 16GB. I rebooted into windows several times after that, and everything was fine before the update.
/ and /home is just how I set it up.
/var seems to take up only 1.2 GB. I don't know, how can I check for any 'cruft'
::: spoiler spoiler
slappy@lemmy.blahaj.zone · 3 pts · 2y
andnekon@programming.dev · 1 pts · 2y
No, the output of these commands is empty. U also tried running with +L, in both cases most of the files were ~100Kb, largest was telegram in /opt with 150Mb.
Is it safe to remove /var/log? I almost never read logs anyway
slappy@lemmy.blahaj.zone · 1 pts · 2y
andnekon@programming.dev · 1 pts · 2y
I zeroed all the files in /var/log, but it had practically no effect on the disk usage
slappy@lemmy.blahaj.zone · 1 pts · 2y
andnekon@programming.dev · 1 pts · 2y
I'm using btrfs When I grew the partition, I only used GParted
andnekon@programming.dev · 1 pts · 2y
I want to thank everyone for the help!
I was finally able to find the issue. Thanks to @slappy@lemmy.blahaj.zone 's question regarding my filesystem type, I decided to look into it.
I use btrfs, and this command showed me, that I have a lot of snapshots made by apt.
It was probably possible to determine how much space each of them was occupying, but I decided to simply delete them all and be done with the issue. So I installed
apt-btrfs-snapshotand rundelete-older-than 0d.As a result, I now have 29 Gb and no backups, which is fine with me.
This answer on askubuntu was useful