Trash Commands

This page details commands related to trash.

Overview

List or manage deleted records in the trash. Deleted records remain in the trash until purged.

Commands

The following functionalities are available when it comes to managing trash through CLI and SDK

Trash List Command

This command lists the records and folders in the trash of vault. The trashed records are loaded in memory and can be fetched as deleted, orphaned and shared folders

DotNet CLI

Command: trash

Example:

My Vault> trash list
  #  Folder UID              Record UID              Name                             Record Type  Deleted At             Status
---  ----------------------  ----------------------  -------------------------------  -----------  ---------------------  ------
  1                          0thOtx4abVGBaNKcycX04Q  defws                            address                             Share 
  2  JSz1s5lZ_KUNwbCnvQZRPw                          testrtg                                       08/10/2025 5:07:04 AM  Folder
DotNet SDK

Functions:

These functions together will give all trashed data.

Power Commander

Command: Get-KeeperTrashList -Verbose

Example

Python CLI

Command: trash list

Flags:

-v --verbose Show detailed verbose output

--format Format of output - Table, JSON or SCV

--output Path to resulting output file (ignored for "table" format)

pattern Search criteria while listing trash

Example:

Python SDK

Function: _ensure_deleted_records_loaded

Trash Restore Command

Use this command to restore any records present in the trash of vault.

DotNet CLI

Command: trash restore <recorduid>

Example:

DotNet SDK

Command: RestoreTrashRecords

Power Commander

Command: Restore-KeeperTrashRecords

Example:

Python CLI

Command: trash restore

Parameter:

records List of record UIDs to be restored

Flags:

--force Skip confirmation messages

-h, --help show this help message and exit

Example:

Python SDK

Function: restore_trash_records

Trash Get Command

Use this command to fetch a trashed record and display its information

DotNet CLI

Command: trash get <recorduid>

Example:

DotNet SDK

Command: Not Applicable

Power Commander

Command: Get-KeeperTrashedRecordDetails

Python CLI

Command: trash get

Parameter:

record Record UID

Example:

Python SDK

Function: get_trash_record

Trash Unshare Command

Use this command to remove or unshare a trashed record from the vaults of other users to avoid creating orphaned accounts. Trashed records will exist in the vaults of users with whom they are shared.

DotNet CLI

Command: trash unshare <recorduid>

Example:

DotNet SDK

Command: Not applicable

Power Commander

Command: Remove-TrashedKeeperRecordShares

Example:

Python CLI

Command: trash unshare

Parameter:

records Record UID

Flags:

--force Skip confirmation prompts

-h, --help show this help message and exit

Example:

Python SDK

Not Applicable

Trash Purge Command

This command is used to clean or clear out (permanently delete) all records and shared folder from the trash

DotNet CLI

Command: trash purge

Example:

DotNet SDK

Command: Coming Soon

Power Commander

Command: Clear-KeeperTrash

Example:

Python CLI

Command: trash purge

Flags:

--force Skip conformation prompts

-h, --help Show this help message and exit

Example:

Python SDK

Function: purge_trash

Last updated

Was this helpful?