Table of Contents

rollback command

Premium

Previews or permanently rolls a checked-in PDM file back to an earlier version. You can select the target by version number, previous version, date, or revision name.

Warning

Rollback permanently deletes every file version after the selected target, including associated file and data-card data. It cannot be undone without restoring the vault database and archives from backup.

The command previews the result by default. It does not change the file unless you add -confirm.

Requirements

  • PDMShell Premium
  • SOLIDWORKS PDM Professional 2017 or newer
  • The file must be checked in
  • The current user must have Rollback permission
  • The selected rollback point must not be cold-stored

Syntax

rollback (-filePath file_path | -id fileId)
         (-version number | -previous | -before date | -revision name)
         [-comment text]
         [-deleteParentReferences]
         [-confirm]

Specify exactly one target selector.

Target selectors

Parameter Short name Description
-version -ver Retains this exact earlier PDM version.
-previous -prev Retains the version immediately before the current version.
-before -before Retains the newest version created before the supplied local date and time.
-revision -rev Retains the newest earlier version carrying this revision name.

ISO 8601 dates are recommended:

2026-07-01
2026-07-01T17:30:00-07:00

A date without a time means the start of that date in local time.

Use -id as an alternative to -filePath for the same operand. A required target still needs one selector, even though each alternative is optional individually. See File IDs and paths for selection rules and command-specific exceptions.

Parameters

Parameter Alias Required Description
-filePath -f No Checked-in PDM file to roll back. Absolute and relative paths are supported.
-comment -cmt No Comment stored with the rollback. Defaults to Rollback performed by PDMShell.
-deleteParentReferences -deleteParentRefs No Deletes affected parent references instead of redirecting them to the retained version. Use with care.
-confirm No Performs the permanent rollback after showing the resolved target. Without it, the command is preview-only.
-version -ver No Exact earlier PDM version number to retain. All later versions will be permanently deleted.
-previous -prev No Selects the version immediately before the current version.
-before No Selects the newest version created before this local date and time. ISO 8601 is recommended.
-revision -rev No Selects the newest version carrying this revision name.
-id No Positive PDM file ID instead of -filePath, identifying the same file that -filePath describes (including a macro, input CSV or existing output file). Requires a connected vault. Shared files with multiple locations require an exact -filePath. Resolving the ID itself does not download, check out or check in the file; the requested command still performs its normal operation.

Parent references are redirected to the retained version by default.

Preview a rollback

rollback -filePath "Part.sldprt" -previous

The preview reports:

ROLLBACK PREVIEW - no changes were made
Current version: 18
Rollback target: 17
Versions permanently deleted: 18-18
Parent references: redirect to the retained version

Perform a rollback

After reviewing the preview, repeat the command with -confirm:

rollback -filePath "Part.sldprt" -previous -comment "Incorrect release" -confirm

Additional examples:

rollback -filePath "Part.sldprt" -version 12
rollback -filePath "Part.sldprt" -before "2026-07-01"
rollback -filePath "Part.sldprt" -revision "B"

Do not use -deleteParentReferences unless you intentionally want to remove references from parent versions to the versions being deleted.