bootc-experimental-install-reset - Man Page

Factory reset with bootc install reset

Description

This is an experimental feature; use --experimental flag to acknowledge.

Overview

The bootc install reset command allows you to perform a non-destructive factory reset of an existing bootc system. This creates a fresh installation state in a new stateroot while preserving the existing system's files on disk. After rebooting into the new deployment, you can still access the old system's data by examining files in /sysroot/ostree/deploy/<old-stateroot>/​.

How it works

When you run bootc install reset:

  1. A new stateroot is created with an automatically generated name (format: state-<year>-<serial>, e.g., s2025-0)
  2. A fresh deployment is created in the new stateroot using the currently booted image (or optionally a different image via --target-imgref)
  3. Kernel arguments related to root filesystem configuration are automatically inherited from the current deployment
  4. The /boot fstab entry is preserved from the current system if it exists
  5. The new deployment becomes the default boot target

After rebooting, you'll be running in a completely fresh system state: - /etc contains only the configuration from the container image - /var is 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 (reset to the same image 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 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:

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

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 allows you to access files from the previous system if needed.

Once you no longer need the old stateroot, you can remove it to free up disk space:

 1.

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>
 1.

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​.

Limitations

See also

See Also

bootc(8), bootc-docs(7)

Version

v1.17.1