Skip to main content

Usage

ocx remove <components...> [options]

Description

Remove installed components from your project. OCX deletes the component files and removes the entry from the receipt file (.ocx/receipt.jsonc).

Arguments

ArgumentRequiredDescription
components...YesComponent references to remove. Canonical IDs are authoritative (e.g., https://ocx.kdco.dev::kdco/researcher@1.0.0); shorthand alias/component refs (e.g., kdco/researcher) are accepted as a convenience.

Flags

FlagShorthandDefaultDescription
--dry-runfalseShow what would be removed without making changes
--force-ffalseForce removal even if files have been modified
--cwd <path>Current directoryWorking directory
--quiet-qfalseSuppress output
--verbose-vfalseVerbose output
--jsonfalseOutput as JSON

Examples

Remove a Single Component (Canonical ID)

ocx remove https://registry.example.com::shadcn/button@1.2.3

Remove a Single Component (Shorthand Convenience)

ocx remove shadcn/button

Remove Multiple Components

ocx remove shadcn/button shadcn/card

Preview What Would Be Removed

ocx remove shadcn/button --dry-run

Force Remove Modified Files

ocx remove shadcn/button --force
If a component’s files have been edited since installation, OCX rejects the removal by default to prevent accidental data loss. Use --force to override this safety check.

See Also