Ban Purge | Reddit for Developers
close

Readme

Ban Purge 🗑️

A Reddit Devvit app that automatically removes posts and comments from banned users in your subreddit. Keep your community clean by retroactively enforcing bans on existing content.

Features 🎯

Core Functionality

  • 🤖 Automatic Purging: Automatically removes content when a user is banned
  • 📋 Batch Processing: Process multiple recently banned users at once
  • 🔒 Subreddit-Specific: Only removes content from the subreddit where the app is installed
  • 📊 Detailed Reporting: Sends comprehensive ModMail reports after each purge

Content Protection

  • ⏰ Time-Based Protection: Only removes content within a specified age limit
  • ⭐ Score Protection: Preserves high-value content above a score threshold
  • 🛡️ Distinguished Protection: Protects moderator-distinguished content
  • 🎯 Selective Removal: Choose to remove posts only or both posts and comments

Configuration ⚙️

Setting Default Description
Number of Recent Bans to Process 5 How many recently banned users to process when running manually
Content Age Limit (days) 30 Only removes content from the last X days
Auto-Remove on Ban ✅ Enabled Automatically purge content when a user is banned
Include Comments ✅ Enabled Remove comments in addition to posts
Score Protection 10 Protect content with scores at or above this value (0 to disable)
Protect Distinguished ✅ Enabled Skip moderator-distinguished content
Send ModMail Reports ✅ Enabled Send summary reports to modmail after each purge

Usage 🚀

Automatic Mode

When enabled (default), the app automatically triggers whenever a moderator bans a user:

  1. Moderator bans a user through Reddit's interface
  2. Ban Purge automatically detects the ban
  3. Removes the banned user's content based on your settings
  4. Sends a ModMail report with details

Manual Mode

Process recently banned users in batch:

  1. Navigate to your subreddit's main page
  2. Click the (three dots) mod menu
  3. Select "🗑️ Purge Recent Bans Content"
  4. The app will process the number of users specified in settings
  5. Check ModMail for the detailed report

ModMail Reports 📧

After each purge operation, you'll receive a ModMail with:

  • Number of users processed
  • Posts removed per user
  • Comments removed per user (if enabled)
  • Any errors encountered
  • Settings used for the operation

Example Report

## Banned User Content Purge Report

**Subreddit:** r/yoursubreddit
**Type:** Manual (recent bans)
**Users Processed:** 3
**Total Posts Removed:** 15
**Total Comments Removed:** 42

### User Details

**u/exampleuser1**
- Posts removed: 8
- Comments removed: 23

**u/exampleuser2**
- Posts removed: 7
- Comments removed: 19

Safety Features 🛡️

The app includes multiple safeguards to prevent accidental content loss:

  1. Subreddit Boundary Protection: Only removes content from your subreddit
  2. Age Limits: Won't remove content older than your specified limit
  3. Score Protection: Preserves popular content
  4. Distinguished Content: Protects mod-distinguished posts/comments
  5. Detailed Logging: All actions are logged for transparency

Best Practices 💡

  1. Start Conservative: Begin with a shorter lookback period (e.g., 30 days) and higher score threshold
  2. Test First: Try the manual mode on a few users before enabling automatic mode
  3. Monitor Reports: Review ModMail reports to ensure the app is working as expected
  4. Adjust Settings: Fine-tune based on your community's needs
  5. Regular Maintenance: Periodically run manual purges to catch any missed content

Troubleshooting 🔧

Common Issues

No content is being removed:

  • Check if the banned users have content within your lookback period
  • Verify score thresholds aren't too low
  • Ensure the content isn't distinguished

App isn't triggering automatically:

  • Verify "Auto-Remove on Ban" is enabled in settings
  • Check that the app has proper permissions

Missing ModMail reports:

  • Ensure "Send ModMail Reports" is enabled
  • Check your modmail inbox and spam folder

Permissions Required 🔐

This app requires the following permissions:

  • Read access to moderation logs
  • Read access to banned users list
  • Remove posts and comments
  • Send ModMail

Privacy & Data 🔒

  • The app only processes data within your subreddit
  • No user data is stored externally
  • All operations are logged locally for transparency
  • The app respects Reddit's API rate limits

About this app