Skip to content

Conversation

@cgwalters
Copy link
Collaborator

Document the bootc-destructive-cleanup.service systemd unit that runs on first boot after an alongside installation with --cleanup. The man page explains how the service is enabled via the systemd generator, what the Fedora cleanup script does, and how distributions can customize the cleanup behavior.

Resolves: https://issues.redhat.com/browse/RHEL-131317

Assisted-by: OpenCode (Claude Sonnet 4)

@github-actions github-actions bot added the area/documentation Updates to the documentation label Jan 16, 2026
@bootc-bot bootc-bot bot requested a review from jeckersb January 16, 2026 22:39
Document the bootc-destructive-cleanup.service systemd unit that runs
on first boot after an alongside installation with --cleanup. The man
page explains how the service is enabled via the systemd generator,
what the Fedora cleanup script does, and how distributions can
customize the cleanup behavior.

Resolves: https://issues.redhat.com/browse/RHEL-131317

Assisted-by: OpenCode (Claude Sonnet 4)
Signed-off-by: Colin Walters <[email protected]>
@cgwalters cgwalters force-pushed the doc-destructive-cleanup branch from e935b00 to 8f42aba Compare January 16, 2026 22:39
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a man page for the bootc-destructive-cleanup.service, which is a valuable addition for users of the --cleanup feature. The documentation is well-written and accurately describes the service's functionality. I've provided a couple of suggestions to enhance the clarity of the customization process for different distributions and to make the SEE ALSO section more comprehensive.

Comment on lines +37 to +40
The current implementation ships a Fedora-specific cleanup script. Other
distributions can provide their own cleanup script by creating an executable
at `/usr/lib/bootc/fedora-bootc-destructive-cleanup` or by modifying the
systemd unit file to reference a different path.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The explanation on how to customize the cleanup script could be clearer for non-Fedora distributions, given the hardcoded Fedora-specific script path. Consider restructuring this section for better clarity. For example:

The service executes a script at the hardcoded path `/usr/lib/bootc/fedora-bootc-destructive-cleanup`.
Distributions can customize the cleanup behavior in two ways:

- Create an executable file at `/usr/lib/bootc/fedora-bootc-destructive-cleanup` to override the default script. Note that the filename is currently not generic.
- Modify the systemd unit file to execute a script at a different path.


# SEE ALSO

**bootc**(8), **bootc-install-to-existing-root**(8), **system-reinstall-bootc**(8)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The SEE ALSO section could be improved by including more relevant bootc commands and systemd man pages. bootc-install(8) is a relevant parent command, and systemd.generator(7) is relevant since the service is enabled by a generator, as mentioned in the description. The reference to system-reinstall-bootc(8) could be removed as it doesn't appear to be part of bootc.

Suggested change
**bootc**(8), **bootc-install-to-existing-root**(8), **system-reinstall-bootc**(8)
**bootc**(8), **bootc-install**(8), **bootc-install-to-existing-root**(8), **systemd.generator**(7)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation Updates to the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant