geckolinux / geckolinux-project

GeckoLinux bug tracker and documentation
https://geckolinux.github.io
207 stars 17 forks source link

How to find out why "/" is using 59.48 GB of space in Gecko Plasma rolling? #428

Closed esteelpaz closed 1 year ago

esteelpaz commented 1 year ago

@geckolinux

While I was upgrading a kernel in a Manjaro install it showed me a partition that I didn't recognize in "sdc12" that seemed to take a long time to process in the grub updating. Checking that partition in Manjaro's GParted it showed the partition as 63GB and using 60.9 GB???

I rebooted into master grub and there was no listed sdc12 . . . then I checked GParted again in my Gecko MATE install and it showed sdb12 using the same rather large amount of space.

I rebooted into sdb12, which is Gecko rolling Plasma and it shows in GParted, using 59.48GB. Still comparatively a large amount of data for the "/" . . . . I checked YaST and I have "keep downloaded packages" . . . unchecked (did that one before and you clued me to it) . . . .

So, what would be using up so much space . . . even compared to my other Gecko installs?? Any way to "autoclean" the system?? Or, would the system be holding all old kernels?? System is relatively "new" install, so it just seems odd ?????

Thanks for some insights on it.

geckolinux commented 1 year ago

Hi there, how's it going?

Are you running a Btrfs root filesystem? If so the snapshots can take up some additional space.

The easiest way I've found to analyze disk usage is with "Baobob", it should be available in the repos for installation.

esteelpaz commented 1 year ago

@geckolinux

Precerate the reply . . . no btrfs is involved . . . ext4 for / and /home. Weekly zypper ref/dup -l. So is that "sudo zypper in baobob" to install it??

geckolinux commented 1 year ago

"sudo zypper in baobob" to install it??

Yep. I assume that you have a graphical environment installed? Otherwise a terminal version that does the same thing is called ncdu .

esteelpaz commented 1 year ago

@geckolinux

Graphical is me. But in some of my systems I have terminal apps installed. Either way is more or less same dif. I would guess the terminal app uses a smaller footprint?? I don't have a whole lot of space left to play with . . . . : - )))

geckolinux commented 1 year ago

Ah yes, in that case sudo zypper in ncdu and then: sudo ncdu /

esteelpaz commented 1 year ago

@geckolinux

OK, installed that and ran it through . . . tried to "save as" all of the data, but it looks like it just shows either the top page, or perhaps whatever is loaded??? Big top user of space seems to be 34.9 GB in /var . . . and in there, top user is /var/cache showing 33.9GB being used there???

Next hit is 21 GB in /usr . . . with /usr/lib using 12.5GB and /usr/src using 4.5 GB . . . .

I would guess that the /var/cache would be the culprit?? Is that a "sudo zypper rm /var/cache" ???? type of command?? Is it safe to delete the /cache???? Or is this a "sudo zypper clean -all" type of situation??

geckolinux commented 1 year ago

Hi there,

Is it safe to delete the /cache???? Or is this a "sudo zypper clean -all" type of situation??

The top-level /var/cache/ folder should not be deleted. You could use ncdu to step into /var/cache/ and see specifically where all the clutter is located.

sudo zypper clean --all should always be safe to run.

esteelpaz commented 1 year ago

Ah, OK, didn't know I could go into the /cache directory . . . so drilling down in there is -- /var/cache/zypp/packages/Tumbleweed_OSS/x86_64 and in there is a bunch of kernels and . . . packages of diminishing sizes to the tune of 24.3 GB. and then there is --- /var/cache/zypp/packages/Tumbleweed_OSS/noarch with a bunch of stuff, libreoffice language updates?? to the tune of 9.4 GB . . . .

Guess I'll try the clean --all and see if that does what it is advertised to do . . . .

General question, since I have perhaps three Gecko rolling editions, what it it about Plasma rolling that is holding so much "bloat" . . . ?? I'm not doing different things in each of my numerous installs . . . just keeping them up to date, etc???

Be back when I see if the cleaning works . . . .

esteelpaz commented 1 year ago

@geckolinux

Alrighty, that was "fast" . . . clean --all now shows /var as 1.1GB . . . doesn't even get a # . . . . GParted shows / as now being 25.69GB . . . still a bit higher than the two other linux installs in the same disk, one 19.72GB and the other 7.58GB . . . .

So, looks like a bunch of space was being held by /cache and that has been tidied. Thanks for the fast replies on it.

geckolinux commented 1 year ago

Hi again, glad that helped. It's hard to say why that particular system had more clutter. I don't think it's specifically because it's a KDE installation, I imagine it's more of a function of how the system was/is used.

Another way to free up some space is by removing old kernels. Just open YaST Software and search for kernel-default and under the versions tab de-select all the old ones you don't need.