Backup sets in the middle cannot be expired, but it is possible to expire the oldest backup sets by running the expire command with retention. For example, the following command will keep only the last two full backups, purging any prior full backups including their associated incremental/differential backups and archive:
pgbackrest --stanza=xxx --repo1-retention-full=2 expire
Using the
--repo1-retention-full option on the command- line simply overrides the setting in the configuration file for that one execution of the command. See the
Retention section in the User Guide for more information on retention.