remove
Remove installed components and clean up unused dependencies.
Usage
npx @gentleduck/cli remove [components...]
npx @gentleduck/cli remove [components...]
Deletes the component's local source folder(s). It does not touch package.json - npm dependencies the component pulled in are never pruned.
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
What it actually does
- Resolves installed components: scans your components directory and matches each subfolder against the registry index.
- Confirms (unless
-y): lists the components and asks before deleting. - Deletes each component's folder: a plain recursive removal of
localPath- no dependency graph walk, nobun remove/npm uninstallcall.
If you want the npm packages a component pulled in gone too, remove them yourself.
What stays
- npm dependencies the component declared (never pruned - see above)
- Your custom edits to other files
- Imports from removed components in your own code: they'll error at compile time, and you fix them
- Theme tokens written by
theme add duck-ui.config.json
To uninstall the CLI itself: bun remove -D @gentleduck/cli.