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?

  • gomp@lemmy.ml
    link
    fedilink
    arrow-up
    6
    ·
    edit-2
    2 months ago

    (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:

    1. mount both partitions in two directories (just create empty ones and mount on them, say ~/root and ~/var)
    2. inside ~/root create the new var/ directory
    3. copy the data over
    4. edit ~/root/etc/fstab (remove the line for the old var partition)
    5. 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

  • BananaTrifleViolin@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    2 months ago

    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 .

  • lurch (he/him)@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    1
    ·
    2 months ago

    you could move the flatpak stuff onto another partition with same permissions and bind mount it to the original location, then persist it with a line in fstab

  • ramius345@sh.itjust.works
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    2 months ago

    If /var is on an LVM backed partition you can add more space to the logical volume then grow the filesystem online if /var is on a filesystem that supports it. Ext4 and xfs both support it.

    Btrfs and zfs should also support online resizing if you are using these. You can figure out what you have using the lsblk command.

    Edit: you will need to add an additional disk to the system or have unallocated free space. If it’s a vm in something like proxmox or VMware you can add an additional disk to the VM then use LVM/btrfs/zfs to add a physical volume/add more space to a pool. If it’s a bare metal physical machine you’ll have to plug in a new disk through a mechanism that supports hot swapping.