when I installed debian 12.7 I created a separated /var directory, along other 2 separated directories (names forgotten).
I also use flatpak and this program is installed in this directory. Executing ‘flatpack update’ I discovered this directory is 95% full, meaning I cannot update anything, because /var is 95% full (only 400 MiB free)
Ideas to solve this?
(I assume you meant “I created a separated /var partition”)
You can move/resize partitions from basically any live usb (via cli or gparted for gnome and kde partition manager for kde).
Shall you want to, you can also merge the var partition with (say) your root partition:
- mount both partitions in two directories (just create empty ones and mount on them, say ~/root and ~/var)
- inside ~/root create the new var/ directory
- copy the data over
- edit ~/root/etc/fstab (remove the line for the old var partition)
- use whatever partitioning tool to get rid of the actual partition and expand the previous/next one
Be aware that you can very easily lose your data ;)
PS: just in case, try running
flatpak uninstall --unused
Is there a reason you gave /var it’s own partition? Or is the problem that your entire root file system is full?
As others have said if you have a /var partition, resizing should fix the problem but the other solution would be to migrate the contents back to your main file system partition. Presumably at present there is a symbolic link folder pointing to your /var partition? Copy the /var partition contents into a new folder then boot in to recovery mode and delete the symbolic link and rename the new folder to /var. However presumably you have a good reason for splitting /var out.
If you don’t have a separate partition then the issue may be your root system itself is full and that partition needs resizing if possible or cleaning our to make space.
Finally, Flatpak does also use the /var directories in the home users folders (it uses this for single user installs of software vs system wide installs). It’s possible it’s axtually the home folder/partition that is full and that needs resizing or cleaning out to make space .
If you end up with resizing /var as the only solution, please post your partition layout first and ask, don’t rush into it. A screenshot from an app like Disk Manager or Gparted should do it, and we’ll explain the steps and the risks.
When you’re ready to resize, you MUST use a bootable stick, not resize from inside the running system. You have to make a stick using something like Ventoy, and drop the ISO for the live version of GParted on the stick, then boot with it and pick the Gparted live. You’ll have to write down the instructions and be careful what you do, and also hope that there’s no power outage during.
The safest method, if your /home has enough space, is to use it instead of /var for (some) Flatpak installs. You can force any Flatpak install to go to /home by adding
--user
to the command.If you look at the output of
flatpak list
it will tell you which package is installed in user home dir and which in system (/var). You can also show the size of each package withflatpak list --columns=name,application,version,size,installation
.I don’t think you can move installed apps directly between system/user like Steam can (Flatpak is REALLY overdue for a good package manager) but you can uninstall apps from system, then run
flatpak remove --unused
, then install them again with--user
.Please note that apps installed with
--user
are only seen by the user that installed them. Also you’ll have to cleanup separately for system and user(s) in the future (flatpak remove --unused
for system, thenflatpak remove --unused --user
for each user).