Skip to content

Enhancement: host reset command (destructive cleanup) #15

@ric03uec

Description

@ric03uec

Summary

Add a host reset command that runs as the xclm user on the target host and wipes the machine back to a clean state by removing all other users, their home directories, services, and residual data.

Goals

  • Provide a repeatable, one-command cleanup for recycling hosts
  • Ensure the operation is explicit, auditable, and hard to run accidentally

Requirements

  • New CLI command (e.g., clm host reset <host>)
  • Executed on the host as xclm
  • Removes all non-system users and their home directories
  • Stops and removes services installed by claws/Clawrium
  • Cleans residual data/config under standard Clawrium paths
  • Requires explicit confirmation (and a --force or --yes flag)
  • Logs all actions and provides a summary of what was removed

Non-goals

  • Partial cleanup or selective user removal
  • Remote backups (can be handled separately)

Acceptance Criteria

  • Reset command is available in CLI help
  • Running without confirmation aborts safely
  • After reset, host is in a clean state for fresh Clawrium install
  • Documentation warns about destructive behavior and recommends backups

Notes

  • This is a destructive operation; consider a two-step confirmation and a dry-run mode

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions