How to go back to Clear Linux's factory settings?

Was wondering if it is possible to delete all installed apps, bundles, and configurations and back to the clean install default without reinstalling.

Thank you!!

So there isn’t a really obvious set of what factory settings are since those change over time as far as default bundles go. If you want something close to minimal for running on hardware, you can remove all the bundles aside from os-core, os-core-plus, os-core-update, whatever kernel-* bundle you want to use, hardware-uefi, bootloader, linux-firmware, syslinux, os-core-webproxy, libglib, p11-kit, libstdcpp and findutils. It might be that depending on your kernel there are some other bundles that you can’t remove but otherwise that should be about the right list. From there, rm -fr /etc/* /home/* /opt/* /var/* /usr/local/* and reboot and that should be pretty much a factory reset. After that I recommend a swupd repair --picky just in case your system had some modifications in places swupd manages.

3 Likes

https://docs.01.org/clearlinux/latest/guides/clear/stateless.html#system-reset

The stateless design separates user data and configuration from system files and packages managed by swupd.

You can delete /etc/, and /var/, and then use swupd repair. This will remove all system-wide customisation and restore your system files to default.

If you also want to remove any per-user customisation, you can either delete the user account, or carefully delete relevant dotfiles in your home directory or ~/.config/ directory.

The above to steps are similar to RESET on Windows 10+.

Of course, as always, make sure you don’t have any personal data you want to retain in /home before doing this!