When downloading fedora 39 I got an error message “Unable to upgrade to Fedora Linux 39: not enough disk space” . I got the same message when installing 38. I got around that by doing things like “dnf clean packages” & “flatpak uninstall --unused”. This time I had to uninstall “Zoom” to make enough room. What am I making room for??? And why does it need so much space. I created /var on its own partition with 10G, which at the time seemed like plenty. What is the best workaround for this? Is there an easy and safe way to increase the size of /var? It seems like there used to be a graphical application that could be used to increase the partition size on a disk by decreasing another partition size that has used space. Can’t seem to find it though.
Thanks,
R.J.
The graphical package you are thinking of is probably gparted
.
/var is used for various things, including cache for dnf (both normal updates and system upgrades [separately]), VM virtual drives, logs, system crash data, and other things that tend to grow. Historically /var was often a separate partition since it tends to grow and as part of the root file system when that file system filled up it caused system crashes. This was at the time when individual drives were very small so physically having a large root file system on a single device was difficult. Today, with much larger drives and often surplus space, that is not as critical but using it as a separate partition does require allocating adequate space.
It seems optimum to either not use a separate partition and allow var to remain in the root file system (/) or alternatively to ensure it is large enough to handle expected (and unexpected) growth.
On my system /var uses ~120 GB (93 GB is used by VMs). YMMV depending upon what you use the system for. 10 GB seems a bare minimum for lightly used systems.
Flatpak installs to /var/lib/flatpak
by default.
You could switch to the user installation and have them in your home directory instead by adding flathub again with --user
. Once you’ve installed all your apps there, you can flatpak remote-delete --system flathub
.
It doesn’t really make sense to subdivide disks into fixed partitions anymore.
If you have adequate space in the root file system /
I would suggest that you boot from a live usb, then mount the installed root files system at some location you designate such as /mnt/root and the installed /var file system at another location such as /mnt/var. Following that you can copy everything from /mnt/var to /mnt/root/var/ with rsync such as sudo rsync -av /mnt/var/ /mnt/root/var/
Once that is done then edit /mnt/root/etc/fstab and comment out the line that mounts the current /var partition so that is no longer mounted.
Finally simply reboot to the normally installed system. At this point the original /var should not be mounted and /var should be used normally as part of the root file system.
You could later remove the old /var partition and leave that space for use somewhere else if desired.
There might be exceptions to make /home
on separate partition, as this will let you format other partitions (e.g., /boot
, /
, others), but /home
in cases when clean system install is required.
If you use btrfs, you can reinstall while preserving the home subvolume: QA:Testcase partitioning custom btrfs preserve home - Fedora Project Wiki
I don’t as I had couple of BTRFS f@ckups which resulted to unrecoverable filesystem, so I partition my important installations manually using recommended partition layout and EXT4.
I do the same and use LVM with ext4.
However, I do not use a separate /var (have not since the mid to late-90s when drive space became reasonably priced), nor do I use a physical swap space.
Note that many of those “recommended partition layout” posts you may find are far outdated from the norm with the hardware available today. As I mentioned above my /var is using ~120 GB (of my 400 GB root file system – with a 2 TB SSD used for my OS). I decided long ago that I did not want to be in the situation of having limited space anywhere.