Librem 5 Memory Full, Now What?

When attempting to do the last PureOS update to my Librem 5, the update is unable to proceed because the memory is full now. I can’t even install new apps now.

It appears that the only way or best way to resolve this issue is to do a factory wipe and reset, to start over. But I know that with any mistakes in that process, I could easily brick the phone, even if unbricking is possible. If possible, I really don’t want to have to connect the phone to my PC (I could connect it to either my Windows or Linux PC if absolutely required). I would rather not have to go through long processes of entering various different terminal commands, if possible. It would be nice if I could just hold the volume key down while booting and then select “wipe and reload OS” on the screen, or something else easy, like that. Alternately, hopefully there is a simple command line that just does everything and then the phone automatically reboots afterward.

If there is not such an easy way, could someone please send me the list of complex instructions to accomplish a wipe and OS reload on the Librem 5 with minimal risk? It’s not that I am afraid of Linux or am not familiar with it. I don’t like changing the oil in my own car either. Some things take up more time and inconvenience if you can find a way to avoid doing them or can at least use the easiest method.

2 Likes
sudo journalctl --vacuum-time=1d
3 Likes

The journal is definitely a good place to start. To keep it from growing too large you can follow this tip from the community wiki: Tips & Tricks · Wiki · Librem5 / Librem 5 Community Wiki · GitLab

I also noticed that the cache in Firefox had grown large as well, even though I had set it to clear every time it closes. That could have been because I have have some websites I set exceptions for.

One last tip is flatpaks, if you have any apps installed. Byzantium by default has an older version of flatpak which has a bug where it keeps older unused runtimes. To clear them out you can follow this: Low disk space - how to clean out garbage? - #54 by wimdows

To update the version of flatpak you can use this to help guide you: Flatpak Bug Librem 5 - #2 by Privacy2

1 Like

This is all good information. The reasons I want a clean wipe and reload instead of trying to free up disk space are several. From the time I received the phone, I didn’t know what I would find and thus, did several experimental things to my Librem 5 when it was new. I don’t think I broke anything significant. But I tried every possible installation method, to see what was possible and to get the apps I wanted, one way or another, without keeping track of what I had installed. The various graphical app stores will typically show everything you’ve installed, even if they didn’t host it. Then you forget over time, exactly how you’ve installed each program and where you got it. So you use a given app store to uninstall something that you installed from a command line (for example) because it wasn’t hosted in any app store. Often, the uninstallation itself breaks then as you attempt to uninstall it from an app store or from the wrong app store. It probably leaves a lot of junk behind in odd places then also. Who knows if any terminal command will find all of that crap and delete it since those apps probably existed in different sub enviromnents (flatpaks, sources, direct command line installations, different app stores, etc…).

Despite my desire to keep everything simple with respect to my Librem 5, I think I am going to have to use a different methodology going forward. I need to keep a writren physical journal of each app I’ve installed, where I got it, and to not allow any compromised apps to be installed, regardless of how good they might be. I prefer to wipe and reload the OS first, to rid the system of all apps and security risks that I’ve forgotten about, before I install and document how much space each app takes up immediately after installing it. That way the space hogs either get tightly managed, or they get uninstalled for not playing nice.

I plan to install only a fully opensource web browser. If that web browser can’t open most web pages because those web pages need a web browser with proprietary snoopware and plugins installed, then I don’t need to see those web pages. So I want to develop an ecosystem in my Librem 5 with no compromises, even if only in a limited world as a result. I think this is where all of us should be headed if we value non-abusive electronic communications and applications. I think that Purism should build special tools to make it easier to manage this process. But sadly, they don’t. All we get With PureOS is an older-looking distro with a limited number of supported apps that work there.

Where is the Android-like or Apple-like graphical user environment, even if for only a limited number of apps? Pretty much all we have is a desktop PC-like graphical environment on our phones.

2 Likes

You drive a hard bargain for “the easy cookbook” solution to your problem. I’ve been using a 128G main storage Librem 5 Liberty thing with a 1028G uSD. But my uSD is bootable with PureOS also.

So, if I wanted to totally wipe my Librem 5 and didn’t care about the data, I would probably launch the dual boot, go to the URL here on Purism site, download the file for the clean install of the OS to an .img file, then use the 1 command sudo dd if=./downloaded-file.img of=/dev/mmcblk0 which erases the installed system and replaces it with the downloaded one.

So enter the mode where I would do that, all I do is hold Volume Down and boot like you said. It boots to the other PureOS installation – the one on the 1028GB uSD card – giving me free reign to overwrite the primary one with this 1 line command.

But if you don’t have an SD card, and didn’t already download the IMG file and can’t put it on the SD because you don’t have one and thus don’t have the space, then doing all that with only the L5 itself is more difficult, because it wasn’t set up in advance.

1 Like

That doesn’t exist yet in the way you go on to describe it. You’ll have to reflash the OS, which will erase everything on the hard drive and install only the default apps. It is accomplished in the way you then stated that you don’t want to have to do.

2 Likes

It looks like your solution Dlonk, is the best. I’ve never been a fan of getting too vested in to any one OS installation. The best way to get rid of the trash is to put your personal files somewhere safe and then to wipe and start over.

Each time you wipe and reload the OS, you get better at making valuable customizations to your environment, while fixing anything that you broke the last time. When I wipe and reload in Android or Windows, I have to stop all of the automatic reloads and customizations of the OS, based on how I had everything the last time. Getting rid of how I had things the last time is actually another goal of the wipe and reload. So one thing I like about Linux is that it takes an extra effort to keep an active profile going that spans one OS wipe and reload and in to the next OS installation. Since that is not what I want to do and not what Linux does by default, it’s a win-win for me every time I do a wipe and reload.

Both Android and Windows want to know who you are up front when you reload the OS, the first time you login. Then they use every tool available to them (including information about you that they’ve stored on their servers), to rebuild every profile association about you that is possible and to store their crap about you on your own device, to reverse much of my actual reason for doing the wipe and reload, to begin with. When you wipe and reload the OS, you’re a new person to the OS. All advertising IDs are gone. All embedded snooping keys are gone. If you manage everything correctly, they stay gone. You cease to exist to the outside world after a successful wipe and reload. If you configure your security tools correctly, you can keep the Google, Apple, Microsoft and others from figuring out who you were the last time they snooped on you. Each time you wipe and reload the OS, the trepidation involved in that procedure disappears more and you feel more like you’ve just taken a shower as opposed to having just fought off an army of identity theives while at the same time giving them more information about you. No metaphorical shower can get you clean when dealing with those vultures. They can only be purged from your device using a wipe and reload, and by using only your first name as your login name. Don’t use closed source social media plarforns and don’t use an email address that contains your last name.

3 Likes

It is neither the only way nor the best way.

I ASSUME that “memory” here means “disk”.

The sensible first step in that case is to investigate where the disk space is being used. There are a range of topics in this forum by people whose disk has filled up and it can be that there is pain-free cleanup that can be done first.

Well you kind of can but I just don’t think that a complete wipe is appropriate.

WARNING: Not tested

The hack way of doing a complete wipe as per your specific proposed method, and with the additional constraint of not connecting to a PC, is to, for example, download a Librem 5 disk image to your phone (to a µSD card), restore the disk image to the µSD card, boot the phone from the µSD card (requires holding down button during boot), image the µSD card to the eMMC drive.

To do this you would need an expendable µSD card e.g. new, blank and it would need to be large enough to accommodate comfortably two copies of the disk image (but that is a very undemanding requirement) and it would probably need to be partitioned very carefully.

This process would of course have been far easier if it had been tackled well before the eMMC drive was even close to full - and easier still if PureOS offered to do it on first boot when a suitable µSD card is available. (Many desktops/laptops come with this kind of recovery partition already set up but that is not an option here because the Librem 5 does not come with a µSD card - but maybe it should!)

I’m unsure of your reason for not wanting to connect to a PC but of course the mucking around with a µSD card can more readily be done from a PC and without ever directly connecting the phone and the PC but of course moving the µSD card from the PC to the phone does create some kind of connection between the two.


I agree with you that it would nicer if PureOS had “factory reset” built-in. However that is only ever going to work when things are not bricked. Hence even if such a function existed, it would still need to be possible to do this same process by connecting the phone to a PC.

2 Likes