BOOTC-EX...LL-RESET(7)
okay bestie, pull up a chair π«Ά you're looking at bootc-experimental-install-reset, and yes, it lives in section 7 of the Miscellaneous Information Manual. it's giving "factory reset but make it careful" and we're gonna go through it together, every last flag, no skipping, periodt π
π NAME π
bootc-experimental-install-reset β Factory reset with bootc install reset β¨
πΈ DESCRIPTION πΈ
okay so first things first, the important part: this is an experimental feature. you gotta pass the --experimental flag to acknowledge that. no flag, no reset, that's the vibe check π₯
π¦ Overview π¦
the bootc install reset command lets you do a non-destructive factory reset of an existing bootc system. what that means, bestie, is it creates a fresh installation state in a new stateroot while preserving the existing system's files on disk. so nothing gets nuked π
after you reboot into the new deployment, you can still get at the old system's data by poking around in /sysroot/ostree/deploy/<old-stateroot>/. the old stuff is right there, just chilling π
β¨ How it works β¨
when you run bootc install reset, here's the whole sequence, in order:
- a new stateroot gets created with an automatically generated name. the format is
state-<year>-<serial>, e.g.,s2025-0β - a fresh deployment is created in that new stateroot using the currently booted image (or, optionally, a different image if you pass
--target-imgref) π - kernel arguments related to root filesystem configuration are automatically inherited from the current deployment π
- the
/bootfstabentry is preserved from the current system if it exists π - the new deployment becomes the default boot target π¦
after rebooting, you'll be running in a completely fresh system state:
/etccontains only the configuration from the container image/varis empty (no user data or state from the previous system)- the old stateroot's files remain on disk at
/sysroot/ostree/deploy/<old-stateroot>/and can be accessed for data recovery or inspection
π οΈ Usage π οΈ
basic usage, i.e. reset to the same image you're currently running:
bootc install reset --experimental
reset and switch to a different image:
bootc install reset --experimental --target-imgref quay.io/example/myimage:latest
reset with a custom stateroot name:
bootc install reset --experimental --stateroot production-2025
reset and immediately reboot:
bootc install reset --experimental --apply
add custom kernel arguments:
bootc install reset --experimental --karg=console=ttyS0,115200n8
skip inheriting root filesystem kernel arguments:
bootc install reset --experimental --no-root-kargs
π§ Kernel arguments π§
by default, bootc install reset automatically inherits kernel arguments from the currently booted deployment that are related to root filesystem configuration. this includes:
root=β root device specificationrootflags=β root filesystem mount optionsrd.*arguments β initramfs arguments (e.g., for LVM, LUKS, network root)- kernel arguments defined in
/usr/lib/bootc/kargs.d/and/etc/bootc/kargs.d/
and you can:
- add additional kernel arguments with
--karg(can be specified multiple times) - skip automatic root filesystem argument inheritance with
--no-root-kargs
π Use cases π
- development/testing: quickly return to a clean state while preserving the ability to boot back to your development environment
- troubleshooting: reset to a known-good state without losing access to the problematic deployment for debugging
- system refresh: start fresh after accumulating configuration changes, while keeping the old state accessible
- image testing: test a new image version in a separate stateroot before committing to it
π§Ή Cleaning up the old stateroot π§Ή
after performing a factory reset and rebooting into the new stateroot, the old stateroot remains on disk at /sysroot/ostree/deploy/<old-stateroot>/. this lets you access files from the previous system if you need them. lowkey a safety net π
once you no longer need the old stateroot, you can remove it to free up disk space:
- first, remove any remaining deployments from the old stateroot:
# List all deployments to find the old stateroot's deployment index
ostree admin status
# Remove the old deployment(s) by index
# The index is shown in the output (e.g., "1" for the second deployment)
ostree admin undeploy <index>
- after all deployments from the old stateroot are removed, you can delete the stateroot directory:
# Replace "default" with your old stateroot name if different
mount -o remount,rw /sysroot
rm -rf /sysroot/ostree/deploy/default
Note: you cannot remove the stateroot directory while deployments still exist in it. OSTree protects deployment directories with filesystem-level mechanisms, so you must undeploy them first using ostree admin undeploy. no shortcuts, bestie π
π§ Limitations π§
- this command requires the
--experimentalflag as the feature is still under development - only works on systems already running
bootc(not for initial installations) - the old stateroot is not automatically removed and will consume disk space until manually deleted (see the "Cleaning up the old stateroot" section above)
π See also π
bootc switchβ switch to a different container imagebootc statusβ view current deployment status
π SEE ALSO π
β VERSION β
v1.17.1
and that's the whole page, bestie π
you made it to the end, iconic behavior. this was bootc-experimental-install-reset from the Miscellaneous Information Manual, version v1.17.1 β go forth and reset responsibly, and don't forget the --experimental flag or nothing happens π«Άβ¨
π¦ where this page comes from
- fedora 43: bootc 1.17.1-1.fc43 Β· Apache-2.0 AND BSD-3-Clause AND MIT AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (Unlicense OR MIT)
- fedora 44: bootc 1.17.1-1.fc44 Β· Apache-2.0 AND BSD-3-Clause AND MIT AND (Apache-2.0 OR BSL-1.0) AND (Apache-2.0 OR MIT) AND (Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT) AND (Unlicense OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms