Hey Sayan, The following dumps all the Content-objects that are orphaned (ie, "not assigned to a repository and not touched in the last "minutes_since_touched" minutes). Needs some expansion, but that depends on what you want to get out of it. Artifact checksums? Content "name" (whatever that means)? UUIDs?
$ pulpcore-manager shell from pulpcore.app.models.content import Content minutes_since_touched = 1 print(Content.objects.orphaned(minutes_since_touched).all()) <BulkTouchQuerySet [<Content (pulp_type=rpm.packagelangpacks): pk=2aee273b-3c1d-493a-9849-5ea717076795>, <Content (pulp_type=rpm.distribution_tree): pk=7aa4d756-fb5b-4630-bfe6-9e9c4f7461ee>, <Content (pulp_type=rpm.packagegroup): shark>, <Content (pulp_type=rpm.packagecategory): all>, <Content (pulp_type=rpm.packageenvironment): SharkEnvironment>]> G On Mon, Jan 31, 2022 at 3:33 AM Sayan Das <say...@redhat.com> wrote: > Hello All, > > I hope everyone is doing great. > > I am reaching out to the developers here as I wanted to find out *How I > can list all orphan contents in Pulp 3* before deleting them? > > I have checked in Pulpcore API as well as Pulp cli but The only option I > see is to remove the orphan contents directly. > > There are many situations where due to customer demand or our own > understanding we may need to understand what all orphan data is present > before we clear them up. > > Keeping that in mind, can anyone please suggest or confirm if we have any > way to simply list the orphan content details in Pulp 3 similar to how we > were able to do with Pulp 2? > > > > Thanks & Regards, > > Sayan das > > *S*enior* T*echnical *S*upport *E*ngineer, RHCE > > Red Hat India > <https://www.redhat.com/> > > Red Hat India Pvt. Ltd, Level-5, Tower-10, Cyber City > > Magarpatta City Hadapsar, Pune-411013, Maharashtra, India. > > say...@redhat.com M: +91-7890892756 IRC: Sayan > <https://red.ht/sig> > _______________________________________________ > Pulp-dev mailing list > Pulp-dev@redhat.com > https://listman.redhat.com/mailman/listinfo/pulp-dev > -- Grant Gainey Principal Software Engineer, Red Hat System Management Engineering
_______________________________________________ Pulp-dev mailing list Pulp-dev@redhat.com https://listman.redhat.com/mailman/listinfo/pulp-dev