divekit purge
Delete the repositories a distribution created in its target groups
Synopsis
Delete the repositories a distribution created in its target groups.
WARNING: This operation is destructive and cannot be undone. All repository content is permanently deleted.
WHAT HAPPENS:
- Reads remotes.json to identify the distributed repositories
- Lists the target group projects and keeps only the recorded ones; other projects in the same groups are reported as skipped
- Shows the deletion plan for confirmation
- Deletes the confirmed repositories
–dry-run shows the plan for the real target groups and exits before the confirmation, so nothing is deleted. –all-group-projects widens the plan to every project in the target groups, including ones Divekit did not create.
Usage
divekit purge [flags]
Examples
# Delete the repositories recorded for a distribution
divekit purge -d ST2M4
# Preview the real deletion plan without deleting anything
divekit purge -d ST2M4 --dry-run
# Also delete projects in the target groups that the distribution did not create
divekit purge -d ST2M4 --all-group-projects
Flags
--all-group-projects Also delete projects in the target groups that this distribution did not create (not recorded in remotes.json)
-d, --distribution string Distribution name
-n, --dry-run Show the deletion plan for the real target groups without deleting anything
-p, --provider string Provider: gitlab (default), local, simulated
-r, --remote string Remote repository URL (e.g. GitLab instance)
-t, --token string GitLab token or token file path (file:///...)
Inherited Flags
-l, --loglevel string log level (debug, info, warn, error, fatal) (default "info")
--no-index skip project index update
--non-interactive run in non-interactive mode (fails if interactive input is required)
-y, --yes assume yes/default for all prompts (non-interactive with automatic defaults)