Linux noob question regarding full / partition
Background: I started daily driving Linux (specifically Mint) several months ago and for the most part it's been great. Some weird hiccups occasionally but nothing I can't handle/deal with. When doing my research to set the system up for the first time, I decided to go with 30GB for the /
partition and ~220GB for the /home
partition (the other half of the drive is for Windows 11 and the various essential tiny partitions). For a while this seemed to be fine, but lately I've been starting to get warnings when performing software updates via the Update Manager that the /
partition is running out of space. I think it peaked at maybe 90-95% full a few weeks ago, at which point I started doing some research and cleaning up a bit (apt autoremove
, deleting old logs and kernels, etc). I was able to claw back ~4GB and kick the can down the road, but now the warnings have returned and I'd like to handle this properly. I'm working from the assumption that I simply made the /
partition too small and intend to double it by giving it some of the Windows space.
My question: How do I know if this is expected or if I've been doing something wrong? Is 30GB indeed too small on modern Mint, or should that have been enough? I know it partially depends on what all I actually do with the computer, but I really don't have very many applications installed (aside from defaults of course) and only four of them are Flatpaks, which I read tend to be larger. If it helps, the Disk Usage Analyzer reports that within /
, /usr
is taking up 13.2GB (55%), /var
accounts for 9.1GB (38%), /opt
is 1GB (4%), and everything else is <1% each.
Thanks in advance!
Potentially unhelpful answer: I've used various Linuxes (Linices?) for quite a lot of years and haven't ever bothered putting
/home
on a separate partition. I know that's not really what you asked, but it seemed worth mentioning just as data point for you and potential option for avoiding the problem entirely.Pre-planning how much space I'm expecting system files and applications to use sounds like a difficulty that's probably better avoided, but as a finger in the wind estimate I would say 30GB is fairly small given that even some python libraries can be >1GB nowadays.
I don't remember my exact thought process from months ago, but I think I saw it recommended to separate
/
and/home
so that switching distros or reinstalling would be easier. My understanding was that you can wipe/
to do either of those things and leave all your user files intact. I think?Yeah, there’s a valid argument for doing it and it’s by no means unheard of - I can especially see why a more new-Linux-user focused distro like Mint would recommend keeping that separation.
I just don’t personally think the trade off is a particularly good one: I’d want backups of all my data anyway, which makes the advantages pretty much moot, and if I were doing anything like a major reinstall that’s going to blow away a system partition I’d really really really want an additional temporary copy of those files on a USB drive that’s physically unplugged anyway - so that when I fat finger a command and wipe the wrong partition on the internal drive I know I can just copy it all back later.
I guess what I’m saying is that I’m too precious about my data to trust a partition to isolate it safely anyway, so I find it easier not to have to worry about balancing partitions at all.
That does make sense. If nothing else it's a reminder that I really need to set up backups again; I used to use Google Drive to back up my machine, but I'm in the (very slow) process of ditching Google so I haven't done that for my new setup. Aside from Timeshift I don't have any automated backing up happening.
It's an understandable philosophy, but it's not that much easier than just backing up your home directory in any other way and reinstating it after a re-install. Personally, most everything in my home directory bar the downloads is synced between all of my devices using Syncthing, and I've never bothered with splitting home out into a new partition.
My / partition is 50GB and that's been fine for me on a very old and very multipurpose machine with all sorts of crap installed, but I wouldn't go much smaller than that.
I'm assuming Mint set you up using ext4, so you can pretty safely resize it if you need to. Gparted is the tool I'd use but there might be a friendlier one out there.
Obviously don't resize partitions containing data you can't afford to lose, but it's a decently safe operation and I've done it plenty of times without an issue. Worst case you have to reinstall but you're probably looking at doing that anyway if / is out of space.
Wait, so can I just resize it or not? I think I'm missing something you're saying here.
You can resize it. In the unlikely event something goes wrong with the resize, you will probably have to reinstall your system. If you don't resize the partition, you're going to have to reinstall and recreate your partitions anyway. So you might as well try.
I didn't want to say "resizing is 100% safe and will definitely solve your issue" because that's not entirely true. Resizing partitions does carry some risk of data loss but it's very small. I haven't ever had a problem with ext4, but have with some other filesystems.
Right, okay. I think I just read the two statements I quoted as conflicting with each other. Thanks.
If you have a filesystem that supports snapshoting + snapshots setup, you might want to purge old snapshots and just keep the more recent ones.
You can use something like filelight to visualize what's using the most data, and that'll give you hints about what you might need to clean (E.g. Old docker images, containers, volumes).
Yeah I meant to mention in the OP that my Timeshift snapshots are saved on
/home
. Clearing those was suggested a lot when I was researching this a few weeks ago but it's not relevant here.AFAIK, unless you've gone out of your way to move them, snapshots stay on the disk/partition as the filesystem they correspond to. So if you're snapshotting
/
it's take up space on the 30GB partition.If you're just snapshotting home then you're correct, that isn't the problem
I'm just snapshotting
/
, but if I go into Timeshift and open the "Location" tab, under "Select Snapshot Location" the partition containing/home
is selected. At the bottom of the window, it says "Snapshots are saved to /timeshift on the selected partition." This appears to be confirmed by the file explorer.Is changing the location selection to something other than default what you mean by "going out of the way to move them"? If so, then yeah, I did that.
This is true for CoW snapshots but OP is using Timeshift which can be used by btrfs but I believe the default is plain ol' rsync and ext4 under the hood. So they're not really what you think of as snapshots.
Flatpaks are pretty space hungry because each one might depend on a different FreeDesktop environment so that's like 1 or 2GB per app lol...
30GB is still very reasonable for a non-GUI system. Lots of space for user files too. But for GUI... each program can be pretty big. If you have something that depends on Gnome, depends on GTK+, something that depends on KDE, depends on Qt... then you have a lot of dependencies that can be large in aggregate. So maybe not that different from Flatpak in the end.
I would say 50GB is reasonable for a GUI system. But if you use something like Btrfs subvolumes or LVM partitioning then it's not so painful when you realize that you need slightly different volume allocations
Main Menu ('start button' menu) > Disks > click on your disk > click on the 'Gears' icon > click 'Resize'.
For safety sake, please backup anything you care about off that disk as an insurance policy if somehow you bork your install and have to wipe/reinstall. Unlikely, but good to take precautions.
Coincidentally, I had to clean up my Manjaro root folder this morning--in my case the main culprit was some log spamming, but also I've been lazy about cache clearing and removing orphans. (I've also allocated 30 GB, another coincidence.)
I used this link in the Manjaro forum--it's probably not exactly what you want, but it may help you find a similar post on the Mint support forum. I found the info on limiting log sizes especially helpful (although I also solved the cause of the spamming, not sure how, exactly...)
I use a single logical partition but keep /home and / in separate btrfs subvolumes.
If you're going to re-partition anyways, I'd recommend looking into btrfs via a distro that supports it out of the box like openSUSE. I think switching to btrfs from ext4 has been one of the biggest level ups of my home computing flow and now I would never live without it. Transparent compression is amazing, snapshots are amazing, btrfs send/receive w/ deltas is amazing, being able to browse the file system of all my backed up snapshots is amazing, I could probably go on.
You can get an idea at a glance of what's taking up that space using something like qdirstat or kdirstat, which recursively visualize which subtrees occupy most of the partition.