My 100 GB root partition filled up.. Is there a way to avoiding wiping my home when reinstalling?

I’m currently stuck with my root partition taking up the full 100 GBs I gave it, I’ve tried looking through Filelight and I can’t come to any conclusions. Flatpaks are taking up 10 GBs but I think thats normal.
I really don’t know what to do. My /usr/share, /usr/lib, /opt, and /var/lib folders are MASSIVE for seemingly no reason, and my only option is either uninstalling things I need or risking my data

Reinstalling will most probably fix this (for now) but my home still has 100 GBs left, and I can NEVER find a convenient solution to where and how I should store my personal files.

I’ve tried having a separate /home partition, but it always leads to either my home or my root partition running out of space, at which point my data risks going nuclear because I have to resize one of the partitions and depending on which partition I have to resize I might have to move the partition to allocate space to it from the other partition (which is INCREDIBLY dangerous and almost wiped out my entire drive in the past)

I’ve tried btrfs subvolumes, and btrfs is by far the most convenient, but NO ONE besides Fedora supports BTRFS, and I’ve heard its an unfinished filesystem as well as a bunch of horror stories about it
From what I’ve found while browsing online and in this forum, the only way to set up an install using btrfs is doing a bunch of undocumented workarounds and hoping the installer doesn’t nuke your data

I don’t want to manually back up and restore my data when reinstalling, since it takes a WHILE with my ~200 GB home partition, its inconvenient, and it also breaks the “created” timestamp since all of the popular Linux filesystems (unlike Windows) only preserve the “move” and “accessed” timestamps when moving files between drives or partitions. I both have programs that rely on timestamps, as well as personally relying on them for organization

That is not true. Most distros support Btrfs, including EndeavourOS.

When it was younger it had a lot of issues and people lost data. It is a fairly old filesystem at this point and quite stable. Most likely the “horror stories” you have read are from many years ago.

No, you just pick it in the drop-down menu when you select the disk you want to use. It is right in the GUI, no secret options or workarounds are needed.

1 Like

I realize this is an old thread, and I don’t mean to necro it, but I am wondering if you ever solved this issue? Since the post was a few years ago, I’m guessing no, or you found a better solution. I’ve discovered that if there are a lot of flatpaks installed, yes it can fill a drive very, very quickly. Am I safe in assuming that there were no Endeavour/Arch packages for what you were seeking at the time? The post is back from nearly 3 years ago, but what you’re after might be found in either Endeavour’s packages or in AUR. For example, I use vivaldi as my browser, which had a flatpak as of November 2023 (a year ago exactly). That took up more room than what was in the arch repositories, so I removed the flatpak and installed that instead. While I have a pretty roomy drive, I do think it’s important to save space wherever possible.

Is there a way to add a second drive to your system? I’m just spitballing here, but it’s something I thought I’d throw out :slight_smile:

Just to clarify, this thread is only one hour old. The banner message at the top says, “It’s been a while since we’ve seen FlooferLand — their last post was 3 years ago.”

By the way, welcome back @FlooferLand. :wave:

2 Likes

Do you happen to use virtual machines, ones based on Qemu in particular?

If you do, check /var/lib/libvirt, you may need to move files from there.

Quite literally had this happen to me last night.

1 Like

Thank you - I completely misunderstood that statement at the top! Appreciate the clarification!

1 Like

No, you just pick it in the drop-down menu when you select the disk you want to use. It is right in the GUI, no secret options or workarounds are needed.

Wouldn’t a normal install wipe my home subvolume in that case?

I know I can create btrfs partitions from the installer in the manual partitioner, but, I haven’t found a way to actually install to specific subvolumes

Fedora has this neat thing called the Blivet GUI partition tool that lets you mark subvolumes as /home or root and whatnot, I haven’t found a way to do that with Endeavour or with Calamaris in general

If you choose manual partitioning, you can wipe it or not wipe it according to your preference. For each partition, you can select “keep” for the content if you want to leave it there, or “format” if you want to wipe it. To keep your old subvolumes intact during the installation, just leave it on “keep” in the manual partitioning setup.

See for example this topic from another forum:

Note that if you choose to install a Btrfs installation on top of an existing one like this, the subvolumes on the existing installation need to be named differently than the names Calamares will attempt to use or the installation will fail. You can just rename them before starting the installer, as described in that topic linked above.

In Endeavour the subvolumes are set up for you automatically, using @ mounted at /, @home mounted at /home, @cache mounted at /var/cache, and @log mounted at /var/log. If you want to make any changes, you can edit /etc/calamares/modules/mount.conf before you start the installer and set it up however you like.

The problem there is… lets say I make a home and root subvolume outside the Calamaris installer using something like Blivet (The Calamaris/EndeavourOS installer doesn’t seem to support modifying subvolumes), the installer won’t have any idea where to install EndeavourOS
During manual partitioning you have to set up root and efi mountpoints, and the partitioning tool doesn’t have a way to set btrfs subvolumes as mountpoints as far as I’ve found

Those workarounds would work, but having to do workaround to get btrfs working is my entire my problem with btrfs
You can’t say btrfs is supported in an installer when you have to edit config files and pull a subvolume switcharoo to get the installation to work
… That being said, i will be trying this
I’m split on either switching to BTRFS, or attempting something I made up on the spot, which is keeping my home directory in my root and deleting everything else, then installing over that partition without formatting it
I’m still not sure how on earth my almost 2 day old root partition already filled up 100 GBs…

Yes it does. I already mentioned this.

The installer creates the subvolumes specified in mount.conf on the Btrfs partition and installs the OS into them. It doesn’t matter if there are other subvolumes on the disk already or not. As long as you don’t opt to format the disk, any existing subvolumes just get ignored during the installation.

What “workarounds”? Running the installer in manual partitioning mode is not a workaround.

You do not need to do anything like that. Most–in fact probably almost all–EndeavourOS users who install with Btrfs have never once modified mount.conf. It is not necessary. Btrfs is fully supported and works with basically no effort or prerequisite knowledge of any kind.

Advanced, elaborate setup schemes that deviate from the default configuration are also supported. All that is required is typing your specifications into a simple text file.

I usually do something like this:

du -h --max-depth=2 /path/you/want/to/check | sort -hr

Then drill down until you find what is using an unusual amount of disk space.

1 Like

I might need some help here because I can’t find how to do this ANYWHERE
I can see there’s a “new volume group” button on the bottom but I don’t think that’s it since it mentions physical volumes and sector stuff
I know I can create btrfs partitions with the installer but I can’t find a way to create subvolumes… or install to existing subvolumes

I’m on the ISO as of writing this doing the rename workaround, but if the only way to save my home subvol from being wiped modifying mount.conf or renaming the subvolumes then renaming them back, that’s a large majority of btrfs users since anyone switching to Endeavour probably wants to keep the btrfs partition from their last install xD
There should probably be a guide for it, or just a way to install and mount specific subvolumes to specific mountpoints in the installer similar to how Anaconda (Fedora’s installer) does things


That command is immediately making it into my .bashrc, somehow even filelight completely missed the 40 GB docker directory in my /var/lib directory (I hate Docker, never installing it again)

Sorry if i sounded passive aggressive in the last post btw, I spent like 2 hours verbally harassing ChatGPT trying to solve my partitioning crisis when I posted that

You don’t need to manually create subvolumes. The installer will automatically create them using the subvolumes and mount points defined in /etc/calamares/modules/mount.conf.

If you want to change the default subvolume setup, for example to rename the subvolumes or add additional subvolumes, just edit the file before you run the installer.

The installer needs to set up new subvolumes. If you want to reuse an old subvolume, do it after the installation is complete (for example, remove the @home subvolume the installer sets up, then rename your old home subvolume @home).

Those are two very easy ways. Probably there are other ways, but those two methods are simple, easy to understand, and fast.

I don’t think it is the majority of users, I think it is a relatively uncommon installation technique. More typically people will make a backup of important data from their old installation, completely wipe the disk when they run the installer, and restore whatever files they need from the backup afterward.

Go ahead and write one. If it’s good, maybe it can become a Discovery article. https://discovery.endeavouros.com/ Be sure to take notes as you go. :wink:

Probably most Linux installers try their hardest to not be like Anaconda! :sweat_smile: I think it has gotten better over the years, but I have always found Anaconda a bit clunky and unintuitive.

Adding a feature like that is a bit outside my wheelhouse, but if you’d like to take a crack at it you can learn about contributing to the EOS Calamares implementation here: https://github.com/endeavouros-team/calamares/blob/calamares/CONTRIBUTING.md

2 Likes

I’ll try to work on a PR a bit later but i cant guarantee anything xD

So… the way i understand it, btrfs subvolumes are just folders, and if i want to reinstall i just delete everything that isnt my home using rm -rf, use mv @home @homebackup, install, then rm the home that the installer created and move my backup back as @home?

i took a look at the partition mid-install and it appears to have wiped everything… oh no…

EDIT: Nevermind… it turns out Endeavour makes an identical partition while installing, and mounts it with the same name lmao
THIS WAS SO MUCH EASIER THAN YOU EXPLAINED
I didnt even have to touch the CLI

You could possibly have cleaned up ur disk space for future reference.

You could make a script with these commands and run every now and then to trim excess files.

sudo pacman -Scc  # Clear pacman cache (this often gets very big, likely would've fixed ur /var/lib problem too)
sudo pacman -Rns $(pacman -Qtdq) # Uninstall dependencies that are no longer needed
sudo journalctl --flush --vacuum-files=5 # Clear old journals/logs
rm -rf ~/.cache/yay/* # Clear yay cache (this often gets very big)

There’s also a bunch more stuff under ~/.cache that you could clean out without issues, such as browser cache.

/opt/ usually has packages which weren’t installed using standard linux filesystem structure. It’s usually just unofficial packages you’ll get from yay with some exceptions such as cuda.

Here, I just ran a script with these and some other commands, this was the result:
image

The bulk of the free space came from the commands I listed above.

Here’s my full script:

#!/bin/sh

#Get Filesystem Size
size=$(df -h / | grep G | cut -d 'G' -f3 | sed 's: ::g')

#Commands:
sudo pacman -Scc
sudo pacman -Rns $(pacman -Qtdq)
sudo journalctl --flush --vacuum-files=5
rm -rf $HOME/.cache/yay/*
rm -rf $HOME/.cache/mozilla/firefox/*
rm -rf $HOME/.cache/chromium/Default/*
rm -rf $HOME/.cache/nvidia/GLCache/*
rm -rf $HOME/.cache/winetricks/*
rm -rf $HOME/.cache/unity3dcache/*
gio trash --empty

#Results
sizea=$(df -h / | grep G | cut -d 'G' -f3 | sed 's: ::g')

echo "Free space before: $size GB
Free space after: $sizea GB"

If you don’t regularly do something like this, you’re liable to just run out of space again.

Unfortunately, I already have a script thats way more aggressive at cleaning up (it sudo -rfs everything inside .cache and already does everything there as well as some other things like flatpak uninstall --unused)
My problem mainly came from Docker somehow storing 40 GBs inside my /var/lib despite only ever using Docker once (I have switched to Podman now, all good) and flatpaks which managed a whopping 10 GB of dependencies despite only having 5 small flatpaks installed…

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.