Delete-file-version command

Permanently and irrevocably deletes one version of a file.

Specifying the fileName is more efficient than leaving it out. If you omit the fileName, it requires an initial query to B2 to get the file name, before making the call to delete the file. This extra query requires the readFiles capability.

If a file is in governance retention mode, and the retention period has not expired, adding --bypass-governance is required.

Requires capability:

  • deleteFiles

  • readFiles (if file name not provided)

and optionally:

  • bypassGovernance

b2 delete-file-version [-h] [--bypass-governance] [fileName] fileId

Positional Arguments

fileName
fileId

Named Arguments

--bypass-governance

Default: False