How to remove or override resources
Remove a resource you selected, turn off one that was selected for you, or override a resource that another configuration layer provides.
Prerequisites
- A configured
.agents/config.yamlor~/.agents/config.yaml. agent-marketplaceon yourPATH.
remove edits v4 selections. Every existing config root, including organization and personal-local, must declare exact v4; included fragments may omit the version or declare exact v4. Otherwise remove refuses before it downloads anything or changes config, locks, or harness files. Convert older configurations before upgrading. Removing hosted Marketplace resources also involves the owning layer's lock; see current limits.
After each change, remove syncs and reconciles the remaining selection in the harness folders.
1. Remove an explicit selection
Remove a skill that you installed by name:
agent-marketplace remove code-review --scope repoThe CLI deletes the entry from the repository configuration and prints Removed code-review. Without --scope, it picks the scope from the layer that selects the resource. Name the scope to control which file changes.
2. Exclude an auto-selected resource
A resource can be selected without being named, for example by a resource group's all: true or tags setting, or by a collection. For those, remove adds an exclude entry instead of deleting anything:
agent-marketplace remove legacy-reviewWhere the exclusion goes depends on how the resource was selected:
- For a collection member, the CLI adds the exclusion to the file that selects the collection and prints
Excluded legacy-review (provided by collection:<collection-name>). The collection stays selected. - For a repository resource selected by
tags, the CLI adds the exclusion to.agents/config.yaml. - For a repository resource selected by
all: true, the CLI adds the exclusion to.agents/config.local.yamlwhen you omit--scope. That hides the resource only in your checkout. To hide it for the whole team, runagent-marketplace remove legacy-review --scope repo, which writes the exclusion to.agents/config.yaml.
For tags and all: true selections the CLI prints Removed legacy-review, even though it only added an exclusion.
3. remove refuses required resources
A resource from a group with required: true ignores every exclusion. remove refuses it with an error such as skill "code-review" is required and cannot be removed. To stop installing it, change the configuration that declares required: true. That is often the organization configuration, which your administrators manage.
An organization Marketplace collection without required: true is optional. To turn off one of its members on your machine, open the TUI, select the member, and press e in the scope modal. The TUI adds a user exclusion to ~/.agents/config.yaml, which must already be v4, like every consumer root. Convert older roots before upgrading. The collection stays selected and its other members stay enabled. The CLI cannot remove a pin from the organization file, which is managed outside the CLI.
4. Target a specific scope
Remove only the user-wide occurrence:
agent-marketplace remove code-review --scope userRemove only the repository occurrence:
agent-marketplace remove code-review --scope repoEach prints Removed code-review and syncs the remaining selection. Another scope or a hosted collection can keep the resource installed, so verify the harness folders with agent-marketplace status rather than assuming every file vanished.
When a resource comes from your user or organization configuration and you omit --scope, the CLI writes the change to ~/.agents/config.yaml and says that it applies across all repositories. You cannot exclude such a resource with --scope repo or --scope local. The CLI refuses and suggests the scope that works.
5. Remove an entire ad-hoc registry
agent-marketplace remove \
--from https://github.com/example-org/agent-resources.git \
--ref v1.4.0If the registry is declared in the target configuration file (the repository file unless you pass --scope), the CLI deletes it and prints Removed registry entry <url>. If the registry comes from another layer, the CLI adds an entry that excludes all of its resources in the target file and prints Excluded all resources from <url> (<scope> scope). Add --path when the same URL is configured more than once.
6. Verify the result
agent-marketplace statusUnder SYNCED RESOURCES, check that the resource is gone from the scope you chose. It can still appear from another scope, or because a hosted collection selects it. Removing a direct Marketplace selection leaves the collection's selection in place.
Troubleshooting
- If
removesays the resourceis enabled from multiple config layers, the same name is selected in more than one scope. The error lists a ready-to-run command for each copy. Rerun with the--scope(and--from,--path) of the one you want to remove. - If
removesays the nameis ambiguous across kinds, add--kind, for example--kind command. - If
removesaysresource "<name>" is not currently enabled, nothing selects that resource right now. Check the name withagent-marketplace status. - If
removerefuses a required resource, change the configuration that declaresrequired: true. Neither removal nor exclusion overrides it.