SYSTEMD-FACTORY-RESET(8)

๐Ÿ’– SYSTEMD-FACTORY-RESET ๐Ÿ’–

okay bestie, gather round, because we're talking about systemd-factory-reset โ€” plus its little entourage of units: systemd-factory-reset-request.service, systemd-factory-reset-complete.service, systemd-factory-reset.socket, and systemd-factory-reset@.service. Together they're the ones who request a factory reset, complete a factory reset, or just tell you what the current factory reset mode is. no cap. ๐ŸŽ€


โœจ SYNOPSIS โœจ

/usr/lib/systemd/systemd-factory-reset
systemd-factory-reset-request.service
systemd-factory-reset-complete.service
systemd-factory-reset.socket
systemd-factory-reset@.service

๐ŸŒธ DESCRIPTION ๐ŸŒธ

systemd-factory-reset is the tool that can query the current factory reset state, request factory reset operations, or complete them. it's giving triple threat, honestly. ๐Ÿ’…

some of that functionality is also available through the /run/systemd/io.systemd.FactoryReset Varlink service โ€” which is implemented via the systemd-factory-reset.socket / systemd-factory-reset@.service units. iykyk. โœจ

and if you want the big-picture lore on how the factory reset logic works, go read Factory Reset[1]. ๐Ÿฆ‹


๐Ÿซถ COMMANDS ๐Ÿซถ

the /usr/lib/systemd/systemd-factory-reset executable can also be invoked straight from the command line, and it takes one of these command arguments:

  • status โ€” report the current factory reset state. it reports one of these:
    • "unsupported" โ€” the OS doesn't support factory reset logic at all, rip
    • "unspecified" โ€” no factory reset was requested, but it wasn't explicitly turned off either
    • "off" โ€” the factory reset logic was explicitly turned off via the kernel command line option
    • "on" โ€” the factory reset is currently enabled and executed
    • "complete" โ€” the factory reset logic ran during the current boot but is complete now
    • "pending" โ€” a factory reset has been requested for the next boot

it returns with an exit status of 0 if the factory reset mechanism is currently not in effect, 10 if a factory reset is currently being executed, or 11 if it's pending for the next boot.

Added in version 258.

  • request โ€” ask for a factory reset operation to be executed on the next boot.
ngl bestie, this is a pretty low-level operation. the primary interface for requesting a factory reset is by starting the factory-reset.target unit. ๐Ÿ‘‘

this sets the FactoryResetRequest EFI variable, see below.

this operation runs when the systemd-factory-reset-request.service unit is started โ€” which is typically one of the services hooked into and ordered before factory-reset.target.

Added in version 258.

  • cancel โ€” cancel any previously requested (but not yet executed) factory reset operation. ๐Ÿšซ

Added in version 258.

  • complete โ€” mark an ongoing factory reset operation as complete. โœ…

this operation runs when the systemd-factory-reset-complete.service unit is started โ€” which is typically one of the services hooked into and ordered after factory-reset-now.target.

Added in version 258.


๐Ÿ’… OPTIONS ๐Ÿ’…

here's everything it understands, bestie:

  • --retrigger โ€” when used with the complete command, it retriggers all block devices. why? because that might result in auto-discovered devices being usable that previously weren't, since the factory reset logic was in place. ๐Ÿ”ฅ

Added in version 258.

  • --quiet, -q โ€” suppresses the state output of status, but still sets the exit status as documented. so it's the strong silent type. ๐Ÿคซ

Added in version 258.

  • -h, --help โ€” print a short help text and exit. classic. ๐ŸŽ€
  • --version โ€” print a short version string and exit. also classic. โœจ

๐ŸŒˆ EFI VARIABLES ๐ŸŒˆ

this next bit is the gossip channel between this boot and the next boot, fr fr. the following EFI variable is set and read by systemd-factory-reset, under the vendor UUID "8cf2644b-4b0b-428f-9387-6d876050dc67":

  • FactoryResetRequest โ€” set whenever a factory reset is requested from the next boot, and deleted once the factory reset is complete. it contains JSON data describing the requesting OS, so that multi-boot systems don't get confused about who asked for what. ๐Ÿ’€

Added in version 258.


๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹

systemd(1), systemd-factory-reset-generator(8), systemd.special(7), Factory Reset[1]


๐Ÿงš NOTES ๐Ÿงš

  1. Factory Reset https://systemd.io/FACTORY_RESET

and that's the whole page, bestie!! ๐Ÿฅณ this was SYSTEMD-FACTORY-RESET(8) from systemd 262.1 โ€” go off and factory-reset responsibly, mwah ๐Ÿ’–โœจ๐Ÿ‘‘

๐Ÿ“ฆ where this page comes from
  • arch rolling: systemd 262.1-1 ยท LGPL-2.1-or-later AND CC0-1.0 AND GPL-2.0-or-later AND MIT-0
  • ๐Ÿ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms