Running out of memory already

Wow!
I haven’t checked whether something got broken while executing these commands. But I did all of them, and now df -h / returns
14Gb free. Disks reports 15 G free.
Result!
Thanks!

3 Likes

I’ve regained 25% 33% of my drive space today. :+1:

1 Like

just a recap. I did:

flatpak uninstall --unused

sudo rm -rf /var/tmp/flatpak-cache-*
sudo rm -rf /var/lib/flatpak/.removed/

sudo journalctl --vacuum-time=7d

3 Likes

Impressive!

Apparently flatpak update removes some stuff, too, if it has reached EOL.

No just uninstalled garbage that is left behind after you remove an app. It shouldn’t remove any installed flatpaks.

1 Like

uninstalling flatpak will give you about 2-3GB.

1 Like

I actually use a couple of flatpaks on the L5, so I’ll keep it for now.

Flatpak is space-hungry, but i would prefer to use a 30 Dollar or Euro, 256GB Memory SanDisc to enlarge some space.

Right know i will not give any advice to edit fstab or use a good encryption setup to mount some Linux System or /home/ Directories, because i can not test them on my Device.

I think it should be easy to store flatpack and some temp Files on an additional cheap SD-Card.

However its good to clean up memory, and have a focus on Directories with too large files inside.

1 Like

Evidently you are on top of that but for those who aren’t and want it automatic: https://source.puri.sm/Librem5/community-wiki/-/wikis/Tips%20&%20Tricks#managing-journals

This is one of the first things that I did because my journal was growing like topsy. Quite apart from the disk space being consumed, it just meant that finding anything in the journal was horribly slow.

1 Like

Yes, I tried that automatic approach. But last time I checked, it appeared not to work.
Even though I had set a maximum journal size, the actual journal was much bigger.

How about a 128 or 256 GB SD card in the other half of the card slot?

I put in a 128GB from for 24 bucks and it was already formatted.

If you have extensive user files you can put them there. (Presume you have other stuff besides apps taking up some of that space.)

Now how to make it your …/home directory ?

Usually on a desktop or laptop you can define that during install. But since the L5 came preconfigured, how to? (gparted?)

It’s not precise, but it will limit the size rather than keep piling up.

I moved parts of my home directory “downloads, documents, music…” to my sd card with a bind mount as from everything I read that is the best way to do it over symlinks. I didn’t move the whole home directory because a question was raised that some apps might balk at mount not on the system drive and also if the sd card dies then I don’t know what will happen when you try to boot the phone so I err’d on the side of caution and just moved folders I knew would be bigger hogs with non system critical info.

2 Likes

I use Stacer from time to time in order to clean out unneeded stuff. Not adapted to the mobile screen, but works really well with an external monitor or laptop dock connected.

My experience is apps install under some hidden directories under the boot directory and they don’t care where home is. I used to play with grub and install a dozen O/S on my laptop, they all pointed to the same home directory for applications. (One of the reasons I never installed cube/os because it could never be sure where anything was.)

But I could be wrong when it comes to this O/S on a phone vs. a laptop.

I was very surprised to run out of space the first day I got the phone after installing just a couple of things. It was quite hidden but finally found resize_rootfs and now there’s plenty space available.

2 Likes

I installed BleachBit earlier today. It does wonders for your disk space, and it behaves very well on the L5 screen.

Here is an update. In another thread it was discussed how the /var/lib/flatpak/appstream/flathub/aarch64 directory can get clogged up with (literally) thousands of unneeded files (in hundreds of directories of which the names consist of a very long hex number and which start with a dot).

I renamed the flathub directory, copied the ‘active’ directory that lives there, as well as the only directory with a long hex number name that is not preceded with a dot to a new, empty ‘aarch64’ directory. Then I waited a couple of days to see what would happen. And when no errors occured I deleted the original flathub directory.
This gave me four or five extra gigabytes of space(!).

I thought I’d mention this here in order to gather this sort of info into one thread.

Use at your own risk, of course. I know others have also deleted all this dross without a problem, but still.

(the other thread)

3 Likes

I just reflash a new Evergreen LUKS and DAS U-Boot image, not that I install many Flatpaks to begin with - I simply prefer a clean slate every so often at whim.