Skip to content

[feature]: Add a confirmation prompt before executing project deletion to prevent accidental destructive operations. #771

@AMAN-sharma07

Description

@AMAN-sharma07

Problem

Currently, deleting projects using the Harbor CLI does not require confirmation.
This can lead to accidental deletion of projects, which is irreversible and may result in unintended data loss.

Proposed Solution

Add a confirmation prompt before executing project deletion.

  • Prompt user before deletion
  • Display project name(s) or project ID in the prompt
  • Abort operation if user declines
  • Skip confirmation when --force flag is used

Example Workflow

Image

Alternatives Considered

Users can manually double-check commands before execution, but this is error-prone and not reliable for destructive operations.

Additional Context

Many CLI tools (e.g., kubectl, docker) include confirmation or safeguards for destructive actions.
This feature improves user safety and aligns Harbor CLI with common CLI UX practices.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions