On 24/5/2021 7:51 pm, Grant Gainey wrote:
Hi Xiao!

On Sun, May 23, 2021 at 10:06 PM Zhang, Xiao <[email protected] <mailto:[email protected]>> wrote:

    Hi Experts,

    I just start to use pulp_deb with docker pulp/pulp.I wonder How to
    clean the pulp database and release disk space?

    I made several repositories, upload Deb packages, sycn remote
    repositories, while after I deleted all distributions,
    publications, remotes and repositories, there are still lots of
    content/packages. So how to remove all of them. Or, are there any
    methods to clear the whole environment and construct a pure new
    one(without any data/file)?


Pulp deduplicates content, so a given artifact can be shared among an arbitrary number of repositories. This is why deleting the repos doesn't on its own remove the content.

When a piece of content is no longer related-to any repositories, it's considered an 'orphan', and is available to be cleaned up. You can start the orphan-cleanup process with this API call:

  http DELETE http://<your-pulp-maching-and-port>/pulp/api/v3/orphans/ <https://urldefense.com/v3/__http://*3Cyour-pulp-maching-and-port*3E/pulp/api/v3/orphans/__;JSU!!AjveYdw8EvQ!NQcpfVi76yN9rLVBWQhz4hNwl088PvZCaRvfdqG6sndiOGskh5KJ3lXVI58LhQkqQ0ko$>

That starts a task that will remove all the unattached content.

It works, work in order with millions of packages!

Great thanks!


Best Regards

Xiao


Great question, hope this answers it for you!
Grant



    Thanks
    Xiao

    _______________________________________________
    Pulp-list mailing list
    [email protected] <mailto:[email protected]>
    https://listman.redhat.com/mailman/listinfo/pulp-list
    
<https://urldefense.com/v3/__https://listman.redhat.com/mailman/listinfo/pulp-list__;!!AjveYdw8EvQ!NQcpfVi76yN9rLVBWQhz4hNwl088PvZCaRvfdqG6sndiOGskh5KJ3lXVI58LhZP-rt9G$>



--
Grant Gainey
Principal Software Engineer, Red Hat System Management Engineering
_______________________________________________
Pulp-list mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/pulp-list

Reply via email to