KVS Cleanup - Find & Delete Large Records
Pricing
Pay per usage
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
Maintained by CommunityActor 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
- Lists all key-value stores in your account
- Calculates the total size of each store by summing all record sizes
- Outputs the largest stores and largest individual records to a dataset
- 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
| Field | Type | Default | Description |
|---|---|---|---|
topN | number | 50 | How many of the largest stores and records to show |
deleteStoresAboveMB | number | 0 | Delete entire stores larger than this (MB). 0 = don't delete |
deleteRecordsAboveMB | number | 0 | Delete individual records larger than this (MB). 0 = don't delete |
dryRun | boolean | true | Preview 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"):
| Field | Description |
|---|---|
storeName | Name of the store (or "(unnamed)") |
storeId | Store ID |
totalSizeMB | Total size of all records in the store |
recordCount | Number of records |
createdAt | When the store was created |
modifiedAt | When the store was last modified |
Record rows (type: "record"):
| Field | Description |
|---|---|
storeName | Name of the parent store |
storeId | Parent store ID |
key | Record key |
sizeMB | Size 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.