Snippets from an e-mail conversation: > Take the following scenario: > - - Create a repo and synchronize it. It brings in packages A, B, and C. > - - Delete the repo. > - - Do a `pulp-admin package search` > > Packages A, B, and C all show up from the package search, indicating > they have no repository. > > - - Is there a use case for keeping them around in Pulp if they aren't in > a repository? Arguably that would make a future sync that would download > those packages faster since they already exist, but is that the intention? > > - - Is there a way to purge those packages? For instance, say a Pulp > installation used to mirror Fedora 12 but gave up on it when Fedora 14 > came out. How do we reclaim all of that space on the Pulp server's hard > disk and/or clean out those packages from the database? ---- Hmm. I thought the desired behavior was to delete the packages and associated rpms off of the filesystem if the packages are no longer associated with a repository. -Todd ---- Without knowing much of anything - my view on this is... We should allow a way to purge at time of delete. Most likely default behavior should be is to remove orphaned packages and to allow you to override to keep. Cliff
Yes. We do need to provide a way of overrriding to keep orphaned packages considering a following RFE: https://bugzilla.redhat.com/show_bug.cgi?id=649765
I addressed this as part of CDN story. The behavior is as follows: * when you delete a repo, if the package associated to that repo are not part of any other repo, we remove those packages. * There is a keep_files option on delete api if you chose to keep the files. default is to nuke * If a package is uploaded without associating to a repo, use content delete to remove these orphaned packages pulp-admin content delete -f foo.rpm -f test.iso or pulp-admin content list --orphaned > orphaned.csv pulp-admin content delete --csv=orphaned.csv
Build: 0.141
verified [root@preethi ~]# rpm -q pulp pulp-0.0.144-1.fc14.noarch [root@preethi ~]# pulp-admin content list --orphaned >orphaned.csv [root@preethi ~]# [root@preethi ~]# [root@preethi ~]# pulp-admin content delete -csv=orphaned.csv Usage: pulp-admin <options> content delete <options> pulp-admin: error: no such option: -c [root@preethi ~]# pulp-admin content delete --csv=orphaned.csv Successfully delete content [grinder-0.0.81-1.fc14.noarch.rpm] from pulp server Successfully delete content [gofer-0.20-1.fc14.noarch.rpm] from pulp server Content with filename [grinder-0.0.81-1.noarch.rpm.1] could not be found on server; skipping delete Successfully delete content [pulp-cds-0.0.143-1.fc14.noarch.rpm] from pulp server Successfully delete content [antlr-2.7.7-6.fc12.x86_64.rpm] from pulp server
Closing with Community Release 15 pulp-0.0.223-4.