19 releases (6 breaking)

0.7.3 May 14, 2023
0.7.1 Mar 26, 2023
0.1.0-alpha.2 Aug 17, 2022
0.1.0-alpha.1 Apr 14, 2022
Download history 91/week @ 2023-02-09 55/week @ 2023-02-16 21/week @ 2023-02-23 71/week @ 2023-03-02 6/week @ 2023-03-09 24/week @ 2023-03-16 36/week @ 2023-03-23 8/week @ 2023-03-30 34/week @ 2023-04-06 29/week @ 2023-04-13 20/week @ 2023-04-20 6/week @ 2023-04-27 75/week @ 2023-05-04 36/week @ 2023-05-11 15/week @ 2023-05-18 21/week @ 2023-05-25

148 downloads per month

MIT license

880 lines



shreddit is a tool to delete Reddit comments and posts.

Deactivating a Reddit account will not delete comments or submissions - it will only disassociate your account from them.

Shreddit overwrites your comments with random text before deleting them to ensure that the originals are (probably) not preserved.

If you don't want your post history to follow you around forever, you can use shreddit on a cron job.

If you're deactivating your account, you can run shreddit first to ensure your posts are deleted.


Because the original Shreddit project was abandoned in 2017, I decided to rewrite it in Rust.

This brings several benefits:

  • You don't need to have Python or anything else installed.
  • Instead of having shreddit.yml and praw.ini config files, all configuration can be done through CLI commands with environment variables as default fallbacks.



Download the binary from the GitHub Releases page.


cargo install shreddit

How to use

Overwrite and delete your Reddit account history.

Usage: shreddit [OPTIONS] --username <USERNAME> --password <PASSWORD> --client-id <CLIENT_ID> --client-secret <CLIENT_SECRET>

  -u, --username <USERNAME>
          Your Reddit username [env: SHREDDIT_USERNAME=your_username]
  -p, --password <PASSWORD>
          Your Reddit password [env: SHREDDIT_PASSWORD=SuperSecretPassword123]
      --client-id <CLIENT_ID>
          To create client credentials, you need to navigate to `https://www.reddit.com/prefs/apps/`, click `create another app...` and fill out the form. Select the `script` type, and set `redirect uri` as `http://localhost:8080` [env: SHREDDIT_CLIENT_ID=lk4j56lkj3lk4j5656]
      --client-secret <CLIENT_SECRET>
          The client secret from when you created client credentials [env: SHREDDIT_CLIENT_SECRET=kl2kj3KJ345lkhRAWE]
          If set, shreddit will not modify or delete anything. It will simply log what it would do if not in dry run mode. This allows you to preview the plan of action before executing [env: SHREDDIT_DRY_RUN=false]
      --thing-types <THING_TYPES>
          What "things" you want to delete [env: SHREDDIT_THING_TYPES=posts,comments] [default: posts comments] [possible values: posts, comments, friends]
      --before <BEFORE>
          [env: SHREDDIT_BEFORE=2023-01-01T00:00:00Z] [default: "2023-03-02 17:49:30.225134209 UTC"]
      --max-score <MAX_SCORE>
          [env: SHREDDIT_MAX_SCORE=100]
      --user-agent <USER_AGENT>
          The User-Agent for Reddit API requests [env: SHREDDIT_USER_AGENT=ShredditRustClient] [default: ShredditRustClient]
      --gdpr-export-dir <GDPR_EXPORT_DIR>
          The path of the directory of the unzipped GDPR export data. If set, `shreddit` will use the GDPR export folder instead of Reddit's APIs for discovering your data [env: SHREDDIT_GDPR_EXPORT_DIR=/home/you/Downloads/export_yourusername_20230101]
  -h, --help
          Print help
  -V, --version
          Print version

You can choose to pass in configuration settings via CLI arguments like:

shreddit --username YouRedditUsername --password YourSuperSecretPassword123  --client-id k1jh2342k3j --client-secret 2345JHLJ_34kjhkj3h453453

or by setting them as environment variables (e.g. SHREDDIT_CLIENT_SECRET) and simply running shreddit.

On startup, shreddit looks for a shreddit.env file in the current directory and sets any variables declared there. However, this is purely optional.

Dry run

You can use --dry-run or SHREDDIT_DRY_RUN=true to see what it would do without it actually doing anything.

Delete ALL your data using GDPR export

  1. Request an archive of all your data by following these steps.
  2. Download the archive and extract it.
  3. Run shreddit with the --gdpr-export-dir flag set to the path of the directory it was extracted to.

Other features

These are the other features Python Shreddit had.

I'll be adding these as I go along. PRs are welcome!

  • Dry run - preview what would happen with given configuration.
  • Preserve comments made after a given datetime.
  • Max score - preserve comments with a score higher than this.
  • Comment sorting
  • Clear vote - Remove your votes before deleting.
  • Item - configure what kinds of items to delete (submissions, comments, etc.)
  • Subreddit whitelist - anything in given subreddits will not be deleted.
  • Whitelist IDs - preserve specific posts by listing their IDs.
  • Preserve distinguished - Don't deleted distinguished comments.
  • Preserve gilded - Don't deleted gilded comments.

Other feature ideas are welcome.


~396K SLoC