KVS Cleanup - Find & Delete Large Records avatar

KVS Cleanup - Find & Delete Large Records

Pricing

Pay per usage

Go to Apify Store
KVS Cleanup - Find & Delete Large Records

KVS Cleanup - Find & Delete Large Records

Scans all key-value stores in your account, ranks records by size, and optionally deletes selected ones.

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Olga Zagrubska

Olga Zagrubska

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

3 days ago

Last modified

Categories

Share

KVS Cleanup - Find & Delete Large Key-Value Stores

Scans all key-value stores in your Apify account, ranks them by size, and optionally deletes the largest stores or individual records.

What it does

  1. Lists all key-value stores in your account
  2. Calculates the total size of each store by summing all record sizes
  3. Outputs the largest stores and largest individual records to a dataset
  4. Optionally deletes entire stores or individual records above a size threshold

Why use it

Key-value stores can accumulate over time from Actor runs, especially ones that save screenshots, HTML snapshots, or large JSON files. This Actor helps you find what's taking up space and clean it up.

Input

FieldTypeDefaultDescription
topNnumber50How many of the largest stores and records to show
deleteStoresAboveMBnumber0Delete entire stores larger than this (MB). 0 = don't delete
deleteRecordsAboveMBnumber0Delete individual records larger than this (MB). 0 = don't delete
dryRunbooleantruePreview what would be deleted without actually deleting

Usage examples

Just scan (no deletion)

Leave all defaults. The Actor scans every store and outputs the top 50 largest stores and records.

{
"topN": 50
}

Preview what you'd delete

See which stores are over 100 MB without deleting anything:

{
"deleteStoresAboveMB": 100,
"dryRun": true
}

Delete large stores

Delete all stores over 100 MB:

{
"deleteStoresAboveMB": 100,
"dryRun": false
}

Delete large individual records

Delete individual records over 10 MB (keeps the stores, just removes big records):

{
"deleteRecordsAboveMB": 10,
"dryRun": false
}

Output

The dataset contains two types of rows:

Store rows (type: "store"):

FieldDescription
storeNameName of the store (or "(unnamed)")
storeIdStore ID
totalSizeMBTotal size of all records in the store
recordCountNumber of records
createdAtWhen the store was created
modifiedAtWhen the store was last modified

Record rows (type: "record"):

FieldDescription
storeNameName of the parent store
storeIdParent store ID
keyRecord key
sizeMBSize of the record

A summary is also saved to the key-value store under the OUTPUT key with totals and the top stores and records.