HOW TO: Delete older object versions in a PowerCenter versioned repository

0


Problem Description 
There are older checked-in versions of PowerCenter objects in the recent PowerCenter folder or repository.
For the largest and most actively maintained folders, the responsive time while using Designer is slow.
Is there a way to clean them all?

Solution
This can be done using one of the following:
  • Advanced Purge
    Using the Repository Manager.
  • PurgeVersion
    Using the pmrep command line tool.
  • Purge Object Version
    Using the Repository Manager.

Advanced Purge (Repository Manager)


You can delete the older checked-in version in the Repository Manager using the Advanced Purge option as follows:
  1. Open Repository Manager.
  2. Connect to the versioned repository.
  3. Select one of the following:
    • Repository (to purge all objects in the repository)
    • Folder (to purge all objects in a folder)
    • Object (to purge one object)
  4. Choose Versioning > Advanced Purge Option.
  5. Select Active objects.
  6. Select either Older than x versions or Older than particular date or number of days

pmrep PurgeVersion (Command Line)


You can use the pmrep PurgeVersion command to purge older versions from a command prompt.

Note:

To use the PurgeVersion command, you must have the Administrator Repository privilege.

Syntax:

The PurgeVersion command uses the following syntax:
purgeversion
{-d <all | time_date | num_day> |
{-n <last_n_versions_to_keep> |
-t <time_date | num_day>}}
[-f <folder_name>]
[-q <query_name>]
[-o <output_file_name>]
[-p (preview purged objects only)]
[-b (verbose)]
[-c (check deployment group reference)]

Example:

The following example purges all versions of all deleted objects in the repository:
pmrep purgeversion -d all
The following example purges all but the latest checked-in version of objects in the folder1 folder:
pmrep purgeversion -n 1 -f folder1
The following example previews a purge of all object versions that were checked in 
before noon on January 5, 2005, and outputs the results to 
the file named purge_output.txt:
pmrep purgeversion -t '01/05/2005 12:00:00' -o purge_output.txt -p

Purge Object Version (Repository Manager)


To purge one object version do the following:
  1. Connect to the repository in Repository Manager
  2. Select the object to be purged
  3. Choose Versioning > View History option
    A pop up window will display all the versions of the selected object.
  4. Select all the versions of the object to be purged.
  5. Select Tools > Purge Object Version.
This can also be used in conjunction with the object query feature in the Repository Manager.
Please refer to the related articles below.