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 FolderDotNet SDK
Functions:
var deletedRecords = TrashManagement.GetDeletedRecords();
var orphanedRecords = TrashManagement.GetOrphanedRecords();
var sharedFolders = TrashManagement.GetSharedFolders();These functions together will give all trashed data.
Power Commander
Command: Get-KeeperTrashList -Verbose
Example
PS> Get-KeeperTrashList -Verbose
VERBOSE: Starting trash list operation with pattern: ''
Folder UID Record UID Name Record Type Deleted At Status
---------- ---------- ---- ----------- ---------- ------
0thOtx4abVGBaNKcycX04Q defws address Share
mdigPPSMrgKA_HIoz4q0ww B9hlKf_0Qitj_MX75JlZ-g test_share_folder_folder_record1234567898765432123456789 login 23/09/2025 7:13:21 AM Share
jWfCYHdhU0sx4-MKi6i6cQ tes_share_folder_folder_folder Shared Folder Folder
PDNS1vASSHMWOhdkBv9Vzg test_share_folder_folder@delete Shared Folder Folder
mdigPPSMrgKA_HIoz4q0ww test_share_folder_folder@delete Shared Folder Folder
JSz1s5lZ_KUNwbCnvQZRPw testrtg Shared Folder FolderPython 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:
My Vault> trash list
# Folder UID Record UID Name Record Type Deleted At Status
--- ---------------------- ---------------------- ----------------------------- ------------------- ------------------- --------
1 record_uid 2025-05-23 17:46:00 RecordPython SDK
Function: _ensure_deleted_records_loaded
trash_management.TrashManagement._ensure_deleted_records_loaded(vault)
deleted_records = TrashManagement.get_deleted_records()
orpahned_records = TrashManagement.get_orphaned_records()
deleted_shared_folders = TrashManagement.get_shared_folders()Trash Restore Command
Use this command to restore any records present in the trash of vault.
DotNet CLI
Command: trash restore <recorduid>
Example:
My Vault> trash restore 0thOtx4abVGBaNKcycX04Q
Successfully initiated restoration of 1 record(s)DotNet SDK
Command: RestoreTrashRecords
public static async Task RestoreTrashRecords(VaultOnline vault, List<string> records)await TrashManagement.RestoreTrashRecords(context.Vault, records);Power Commander
Command: Restore-KeeperTrashRecords
Example:
PS> Restore-KeeperTrashRecords -Records 0thOtx4abVGBaNKcycX04Q
Successfully initiated restoration of 1 record(s)
Use 'Get-KeeperTrashList' to verify the restorationPython 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:
My Vault> trash restore <record_uid>
Do you want to restore 1 record(s)? [y/n]: yPython SDK
Function: restore_trash_records
trash_management.restore_trash_records(vault, record_uids)
record_uids - list of uids
vault - vault instanceTrash Get Command
Use this command to fetch a trashed record and display its information
DotNet CLI
Command: trash get <recorduid>
Example:
My Vault> trash get 0thOtx4abVGBaNKcycX04Q
Title: defws
Type: address
address: fdvefcq ₹ewrwfwv₹, esvbwqe, ₹webvwe bevwewds, DZ
Direct User Shares: [email protected] (Read Only) Power Commander
Command: Get-KeeperTrashedRecordDetails
PS> Get-KeeperTrashedRecordDetails
cmdlet Get-KeeperTrashedRecordDetails at command pipeline position 1
Supply values for the following parameters:
RecordUid: 0thOtx4abVGBaNKcycX04Q
Title: defws
Type: address
address: fdvefcq, ₹ewrwfwv₹, esvbwqe, ₹webvwe, bevwewds, DZPython CLI
Command: trash get
Parameter:
record Record UID
Example:
My Vault> trash get <record_uid>
Title: test_record
Type: login
login: [email protected]
password: password
url: keepersecurity.comTrash 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:
My Vault> trash unshare B9hlKf_0Qitj_MX75JlZ-g
There are no records to unsharePower Commander
Command: Remove-TrashedKeeperRecordShares
Example:
Remove-TrashedKeeperRecordShares -Records "NyTgDxKnMRhcgpR_BGkFkw"Python CLI
Command: trash unshare
Parameter:
records Record UID
Flags:
--force Skip confirmation prompts
-h, --help show this help message and exit
Example:
My Vault> trash unshare <record_uid>
Do you want to remove shares from 1 record(s)? [y/n]: y
My Vault>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:
My Vault> trash purge
Are you sure you want to permanently delete all records in trash? This action cannot be undone. (yes/No): s
Purge operation cancelledPower Commander
Command: Clear-KeeperTrash
Example:
PS> clear-KeeperTrash
Are you sure you want to permanently delete all records in trash? This action cannot be undone. (yes/No): yes
Successfully purged all records from trashLast updated
Was this helpful?

