# Problem Statement/Use cases: * As a user I might have content that I no longer need to serve but I want to keep it in the repo for history purposes. I want to still be able to free up some disk space in such case. * As a user I have repos that have deferred download policy and I want to clear out downloaded files for those repos. A repository with deferred download policy will store artifacts locally after they have been requested, but there really isn't a way to have pulp delete the locally stored files and free disk space if these packages are unlikely to be used again. # Solution `pulp/api/v3/repositories/<reclaim-disk-space>/` Provide a separate endpoint which will accept a list of repo hrefs to reclaim disk space for. * Artifacts only exclusively to that list of repos will be removed. No new versions will be created or removed because content set will not change. * The task will only remove those Artifacts that have a corresponding Remote artifact. * There, however, will be a `force` flag that will remove Artifacts that have no RA( aka uploaded content). This will **not** be a default behavior. * The task will trim Artifacts regardless of the download policy. ( Content app would be able to stream artifact if it is locally available otherwise with the help of RA( if available) it would download artifact from the remote source) # Under discussion Add `keeplist` option for repo_versions which will be excluded from artifact removal. This option will accept list of repo_version hrefs to keep.