remove
Remove installed components and clean up unused dependencies.
Usage
npx @gentleduck/cli remove [components...]
npx @gentleduck/cli remove [components...]
Deletes the component source files and prunes any npm dependencies that no other installed component still uses.
Options
| Flag | Description |
|---|---|
-y, --yes | Skip confirmation |
-c, --cwd <cwd> | Working directory |
-w, --workspace <path> | Target workspace |
Examples
# Remove specific components
npx @gentleduck/cli remove carousel resizable
# Remove from a workspace
npx @gentleduck/cli remove sidebar --workspace apps/dashboard
# Skip confirmation
npx @gentleduck/cli remove dialog -y# Remove specific components
npx @gentleduck/cli remove carousel resizable
# Remove from a workspace
npx @gentleduck/cli remove sidebar --workspace apps/dashboard
# Skip confirmation
npx @gentleduck/cli remove dialog -yHow dependency cleanup works
- Resolves the component's npm deps — e.g.
dialogdeclared@radix-ui/react-dialog. - Scans other installed components — does any still need
@radix-ui/react-dialog? - Removes if orphaned — runs
bun remove/npm uninstallon the unused packages.
The CLI never removes a dep you'd hand-installed yourself unless it's also declared by the component being removed.
What stays
- Your custom edits to other files
- Imports from removed components in your own code — they'll error at compile time, you fix them
- Theme tokens written by
theme add duck-ui.config.json
To uninstall the CLI itself: bun remove -D @gentleduck/cli.