Skip to content

Feature: Unsafe Full Delete (--full-wipe) #5

@tejaswankalluri

Description

@tejaswankalluri

Problem:
Users sometimes require a "factory reset" for their Docker environment, clearing absolutely everything (containers, images, networks, cache) without the granular scanning and selection process.

Proposed Solution:
Add a --full-wipe flag (or command) that wraps the native docker system prune -a command.

Requirements:

  1. Command/Flag:

    • docklean --full-wipe
    • This mode bypasses the standard scan -> select flow.
  2. Behavior:

    • Executes docker system prune -a (removes all stopped containers, all networks not used by at least one container, all images without at least one container associated to them, all build cache).
    • Volume Support: Ideally, should support including volumes (e.g., if combined with --volumes or via a specific prompt).
  3. Safety:

    • Mandatory Prompt: Must display a high-visibility warning (e.g., "⚠️ THIS WILL DELETE ALL STOPPED RESOURCES, INCLUDING UNUSED IMAGES AND CACHE.").
    • Confirmation: Require an explicit "yes" from the user.
    • Force Flag: Support --force to bypass the confirmation prompt (e.g., docklean --full-wipe --force).
  4. Implementation Details:

    • Add the flag to src/args.ts.
    • In src/index.ts, check for this flag early and branch to a dedicated handler that invokes the docker command directly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions