[SOLVED] my var directory on debian 13.1 has only 500 MiB free space and I cannot update flatpak anymore. How do I solve this?
from arsus5478@lemmy.ml to linux@lemmy.ml on 21 Sep 19:51
https://lemmy.ml/post/36483583

[SOLVED] too many unsuccessful flatpak updates lingered in this directory. It sorted itself out after rebooting the system.

var capacity 11.1 GiB, var usage 10.6 GiB

#linux

threaded - newest

JASN_DE@feddit.org on 21 Sep 20:04 next collapse

Well, what’s using your /var?

istdaslol@feddit.org on 21 Sep 20:14 next collapse

Usually var gets full of old log files. So maybe delete some of those. Apt-cache is also a suspect

just_another_person@lemmy.world on 21 Sep 20:18 next collapse

du -hsc /var

Check the sheets to see which directories are taking up your space.

arsus5478@lemmy.ml on 24 Sep 06:01 collapse

du -hsc /var

sudo du -hsc /var returns: 10G /var, 10G total

du -hsc /var returns: du: cannot read directory ‘/var/lost+found’: Permission denied, du: cannot read directory ‘/var/spool/cron/crontabs’: Permission denied

25 more lines like this

just_another_person@lemmy.world on 24 Sep 06:22 collapse

Put a sudo in front of that then

pollopolis@lemmy.ml on 21 Sep 20:29 next collapse

Uninstall all the flatpak packages that are installed as system wide packages and install them as user packages, that way flatpak will use your /home partition. I had the same problem.

arsus5478@lemmy.ml on 24 Sep 06:00 collapse

Uninstall all the flatpak packages that are installed as system wide packages and install them as user packages

would you eli5 how to do this?

db2@lemmy.world on 21 Sep 20:41 next collapse

dd if=/dev/zero of=/var

But really, remove what you don’t use and/or stop using flatpak.

data1701d@startrek.website on 21 Sep 21:43 next collapse

FYI Don’t use this command. I think it was intended as a joke, but I just want to clarify.

db2@lemmy.world on 21 Sep 22:17 collapse

That’s why I didn’t include any privilege escalation, even if someone ran it as is it would fail. But a warning is also appropriate, thanks.

bus_factor@lemmy.world on 22 Sep 05:06 collapse

That doesn’t make it better.

The first thing a novice user learns is to slap sudo in the front if they don’t have access to do something.

db2@lemmy.world on 22 Sep 11:54 collapse

Nobody puts var on its own partition anymore, it would sill fail.

Wispy2891@lemmy.world on 22 Sep 19:53 collapse

He either has var on a dedicated partition or has a 12 gb drive in 2025

gravitywell@sh.itjust.works on 22 Sep 03:28 collapse

Wouldn’t that just make a file full of zeros?

I think the proper (joke) command here would be

rm -rf /var/*

db2@lemmy.world on 22 Sep 04:05 collapse

It would probably fail unless var was a block device actually. It wouldn’t turn a directory in to a file.

chellomere@lemmy.world on 21 Sep 21:30 next collapse

You can use baobab or ncdu to try to figure out what’s filling it up.

arsus5478@lemmy.ml on 24 Sep 06:17 collapse

I installed baobab 48.0.2 with sudo apt.

should I install ncdu 2.9.1 with uniget install ncdu? the apt version is older than that

chellomere@lemmy.world on 24 Sep 15:51 collapse

You do you, but I think it’s rarely worth it having the absolutely newest version of something. The Debian version of a package may be older, but often has the advantage of being well-tested. And the Debian version of ncdu is all I’ve ever used and it has worked well.

uniget, huh? That’s not a package manager I’ve ever heard of before.

mactan@lemmy.ml on 22 Sep 04:34 next collapse

why would var have such a restraint? reminds me of overly complex tutorials tricking people into elaborate partitioning schemes

mlfh@lemmy.sdf.org on 22 Sep 16:44 collapse

/var is often where processes dump a lot of data (logs, databases, etc), and subpartitioning of /var sets a cap so that when too much data is dumped there, the application crashes instead of the whole system. /var/log is often recommended to be subpartitioned separately as well, so that logging can still go on if the application data fills up and crashes.

These kinds of overruns can be intentional DOS attacks, also, so the subpartitioning is often a security recommendation. NIST 800-171 requires separate partitions for /var, /var/log, /var/log/audit, and /var/tmp

mlfh@lemmy.sdf.org on 22 Sep 16:49 collapse

apt-get clean will clear the apt cache and should give you enough temporary storage headroom on /var to do things, but if you’re bumping up on this limit often, you’ll need to reconfigure your storage.