Remove APIο
Warning
This feature is experimental and subject to breaking changes. See the Conan stability section for more information.
Warning
Subapis must not be initialized by themselves. They are intended to be accessed only through the main ConanAPI attributes.
- class RemoveAPI(conan_api, api_helpers)ο
This API is used to remove artifacts from either remotes or the Conan cache. It can either remove specific package references, or whole recipe references with all its associated packages
- recipe(ref: RecipeReference, remote: Remote | None = None)ο
Removes the specified recipe reference alongside all its associated packages.
If
remoteis specified, the recipe will be removed from the remote, otherwise they will be removed from the local cache.- Parameters:
ref β Recipe reference to remove
remote β Optional remote to remove references from
- recipes(refs: List[RecipeReference], remote: Remote | None = None)ο
Removes the specified recipe reference alongside all its associated packages.
If
remoteis specified, the packages will be removed from the remote, otherwise they will be removed from the local cache.- Warning:
This method is not atomic wit respect to each of the given references
- Parameters:
refs β List of recipe references to delete, must contain recipe revisions
remote β Optional remote to remove references from
- package(pref: PkgReference, remote: Remote | None = None)ο
Removes the specified package reference.
If
remoteis specified, the packages will be removed from the remote, otherwise they will be removed from the local cache.- Parameters:
pref β Package reference to remove
remote β Optional remote to remove references from
- packages(prefs: List[PkgReference], remote: Remote | None = None)ο
Removes all the specified package references.
If
remoteis specified, the packages will be removed from the remote, otherwise they will be removed from the local cache.- Warning:
This method is not atomic when performed in the local cache with respect to each of the given references, nor are remotes guaranteed to implement this call atomically either.
- Parameters:
prefs β List of package references to delete, must contain package revisions
remote β Optional remote to remove references from