garbage-collect

Perform garbage collection on Pulp data.

Garbage collection consists of deleting temporary Pulp repositories (created by certain tools) older than a certain age. Future versions of this command may also perform other types of garbage collection.

This command is suitable for use periodically; for example, from a weekly scheduled trigger.

usage: pubtools-pulp-garbage-collect [-h] [--debug] [--pulp-url PULP_URL]
                                     [--pulp-user PULP_USER]
                                     [--pulp-password PULP_PASSWORD]
                                     [--pulp-certificate PULP_CERTIFICATE]
                                     [--pulp-certificate-key PULP_CERTIFICATE_KEY]
                                     [--pulp-insecure]
                                     [--pulp-throttle PULP_THROTTLE]
                                     [--pulp-fake]
                                     [--gc-threshold GC_THRESHOLD]
                                     [--arc-threshold ARC_THRESHOLD]

Named Arguments

--debug, -d

Show debug logs; can be provided up to three times to enable more logs

Default: 0

--gc-threshold

delete repos older than this many days

Default: 5

--arc-threshold

delete all-rpm-content older than this many days

Default: 14

Pulp environment

--pulp-url

Pulp server URL

--pulp-user

Pulp username

--pulp-password

Pulp password (or set PULP_PASSWORD environment variable)

--pulp-certificate

Pulp certificate. Can also be a single file (.pem)

--pulp-certificate-key

Pulp certificate key

--pulp-insecure

Allow unverified HTTPS connection to Pulp

Default: False

--pulp-throttle

Allows to enqueue or run only specified number of Pulp tasks at one moment (or set PULP_THROTTLE environment variable)

--pulp-fake

Use a fake in-memory Pulp client rather than interacting with a real server. For development/testing only, may have limited functionality.

Default: False

Example

A typical invocation of garbage-collect would look like this:

pubtools-pulp-garbage-collect \
  --pulp-url https://pulp.example.com/ \
  --pulp-user admin \
  --pulp-password XXXXX \
  --gc-threshold 14

In this example, temporary repositories older than 2 weeks would be deleted from the remote Pulp server.