Grok Batch Deleter
Bulk delete files, share links, and deleted chats from Grok in safe batches. Auto-scrolls to load more, skips your exceptions (e.g., .pdf, "important"), and shows live progress. Fast, smart, and beautiful.
Overview
Grok Batch Deleter is a Tampermonkey / Greasemonkey script that lets you bulk delete items across three Grok pages:
It features a beautiful UI, real-time progress, smart exceptions and low-memory processing — perfect for cleaning up hundreds or thousands of items without crashing your browser.
Key Features
| Feature |
Description |
| Batch + Scroll Deletion |
Deletes all currently loaded items, automatically scrolls to load more, deletes them, and repeats until nothing is left. |
| Smart Exceptions |
Skip files by extension (e.g., .pdf, .md) or chats by keywords (e.g., important, work). |
| Page Auto-Detection |
Detects which page you're on and adjusts behavior automatically. |
| Real-Time Stats |
See deleted, skipped, and progress live. |
| Stop Anytime |
Click Stop to cancel instantly. |
| Safe & Efficient |
Processes in small batches — no full pre-load, no memory bloat. |
How It Works (The Magic Behind Batch + Scroll)
"Delete → Scroll → Delete → Repeat"
Grok uses infinite scroll — only a few dozen items load at a time. Loading everything at once would crash your browser if you have 10,000+ files.
This script avoids that by:
- Step 1: Finds all currently visible items in the list.
- Step 2: For each:
- Reads the title
- Checks if it matches your skip list (e.g.,
.pdf or important)
- If not skipped, hovers to reveal the Delete button → clicks → confirms
- Step 3: After deleting the batch, scrolls down to load the next set.
- Step 4: Waits for new items to appear.
- Step 5: Repeats from Step 1 until no new items load (3 failed scrolls = done).
Result: You can delete thousands of items in under 10 minutes, safely and smoothly.
Installation
- Install Tampermonkey (Chrome/Edge) or Greasemonkey (Firefox).
- - Open Tampermonkey → Create a new script
- Paste the full script → Save
Usage
Go to any of these pages:
You’ll see a control panel at the top.
Configure:
- Target Page: Auto-selected, but you can change.
- Skip Extensions / Keywords:
- Files:
pdf, jpg, md → keeps these files
- Chats:
important, draft → keeps chats with these words
Click Start
Watch it:
- Delete current list
- Scroll down
- Load more
- Delete again
- Repeat until done
Click Stop to cancel.
Example Use Cases
| Page |
Skip Input |
Result |
| Files |
pdf, docx |
Deletes all except PDFs and Word docs |
| Share Links |
pdf |
Deletes all shared links except those with .pdf |
| Deleted Chats |
backup, important |
Permanently deletes all chats except those with "backup" or "important" in title |
Technical Details
- Selectors are based on Grok’s current DOM (as of Nov 2025).
- Uses
button[aria-label="Delete file"] and hover events to reveal hidden buttons.
- Confirms deletion via global modal.
- Works in left panel (
#_r_2s_ .overflow-y-auto).
- No external dependencies.
Safety & Privacy
- Runs entirely in your browser
- No data sent anywhere
- Only interacts with your own Grok account
- You control what gets deleted