{"record":{"id":"c6c4c2f54d071ad4","repo":"langchain-ai/deepagents","slug":"extra-extra-r-is-also-provided-by-listed-and-c","errorCode":null,"errorMessage":"Extra {extra!r} is also provided by {listed} and cannot be removed independently. Remove that extra instead, then reinstall the extras you want individually.","messagePattern":"Extra (.+?) is also provided by (.+?) and cannot be removed independently\\. Remove that extra instead, then reinstall the extras you want individually\\.","errorType":"exception","errorClass":"CompositeExtraConflictError","httpStatus":null,"severity":"error","filePath":"libs/code/deepagents_code/update_check.py","lineNumber":3797,"sourceCode":"    the `--with` packages.\n    \"\"\"\n    if not is_valid_extra_name(extra):\n        msg = (\n            f\"Invalid extra name {extra!r}: must match PEP 508 \"\n            f\"({_EXTRA_NAME_RE.pattern})\"\n        )\n        raise ValueError(msg)\n    from deepagents_code.extras_info import BASE_DEPENDENCY_EXTRAS\n\n    selected_extra = canonicalize_name(extra)\n    if selected_extra in BASE_DEPENDENCY_EXTRAS:\n        msg = f\"Extra {extra!r} is a base dependency and cannot be removed.\"\n        raise ProtectedExtraError(msg)\n\n    extras = _uv_tool_selected_extras(distribution_name=distribution_name)\n    conflict = _composite_extra_conflict_message(extra, selected=extras)\n    if conflict is not None:\n        raise CompositeExtraConflictError(conflict)\n    if selected_extra not in extras:\n        listed = \", \".join(sorted(extras)) or \"(none)\"\n        msg = f\"Extra {extra!r} is not installed. Selected extras: {listed}\"\n        raise ExtraNotInstalledError(msg)\n    return _uv_tool_install_command(\n        version=version,\n        include_prereleases=_resolve_include_prereleases(\n            None, installed=_parse_version(version)\n        ),\n        distribution_name=distribution_name,\n        extras_to_remove=(selected_extra,),\n        reinstall=True,\n    )\n\n\ndef _composite_extra_conflict_message(\n    extra: str,\n    *,","sourceCodeStart":3779,"sourceCodeEnd":3815,"githubUrl":"https://github.com/langchain-ai/deepagents/blob/a1af029e6e73cb17c36bff823d227747b28e91e1/libs/code/deepagents_code/update_check.py#L3779-L3815","documentation":"Raised when the extra being removed is also supplied by another selected extra (a composite/overlapping extra), so it cannot be removed on its own. The library inspects the currently selected uv tool extras and refuses independent removal to avoid breaking the composite extra. You must remove the composite extra instead.","triggerScenarios":"Calling the remove-extra API (update_check.py) with an extra that appears in the provider set of another installed extra, as detected by _composite_extra_conflict_message against the extras reported by _uv_tool_selected_extras.","commonSituations":"Extras like 'all' or feature bundles that pull in sub-extras; after installing a bundle extra, trying to remove one of its members individually; version changes that moved an extra into a bundle.","solutions":["Remove the composite/bundle extra named in the message (Remove that extra instead), then reinstall only the individual extras you want.","List currently selected extras (e.g. `uv tool list --show-extras` or the library's selected-extras helper) to identify the owning bundle.","Update your install scripts to express the desired set as individual extras instead of a bundle."],"exampleFix":"// before\nremove_extra('search-tools')  # provided by bundle 'all'\n// after\nremove_extra('all')\ninstall_extra('search-tools')","handlingStrategy":"validation","validationCode":"from deepagents_code.update_check import _composite_extra_conflict_message, _uv_tool_selected_extras\nconflict = _composite_extra_conflict_message(name, selected=_uv_tool_selected_extras(distribution_name=dist))\nif conflict:\n    print('remove the bundle extra instead:', conflict)","typeGuard":null,"tryCatchPattern":"try:\n    remove_extra(name)\nexcept CompositeExtraConflictError as e:\n    owner = extract_provider_from_message(str(e))\n    remove_extra(owner)  # remove bundle, then reinstall desired individuals","preventionTips":["List selected extras before removal to spot bundle extras","Model install sets as individual extras rather than 'all'-style bundles","Re-check extras after version upgrades, as bundle membership can change"],"tags":["extras","conflict","dependencies"],"backgroundTag":"extra-conflict","analyzedSha":"a1af029e6e73cb17c36bff823d227747b28e91e1","analyzedAt":"2026-08-29T11:43:24.718Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}