If you don’t want to trust a third-party service, here’s some really ugly code that I spun up quite a while ago when I still sucked at coding (even though I still do), along with some instructions that I chatGPT’d for it. It doesn’t handle your posts, only comments. I never had enough posts to bother when I could just do it by hand.
Still seems to work even with API restrictions, but maybe that’s because I didn’t hit the limit when I tested it out just now.
Scroll down to the “Developed Applications” section and click “Create App” or “Create Another App”.
Fill out the form:
name: Any name will do.
App type: Choose “script”.
description: Can be left blank.
about url: Can be left blank.
redirect uri: http://localhost:8080
permissions: Choose ‘read’.
Click “Create app”.
On the app details page, you will see a section named “Developed Applications”. Here, the client ID is listed under the web app you just created, just below the web app title. It is a string of characters and numbers. The client secret is listed as “secret”.
Save Your Client ID, Secret, and Refresh Token in Your Keyring
Use Python’s keyring package to securely save your Reddit app’s client ID, client secret, and Reddit account’s refresh token. You can use the following Python commands to store these values:
Replace "YourServiceName", "YourClientID", "YourClientSecret", and "YourRefreshToken" with the actual service name, client ID, client secret, and refresh token. The service name can be any name you choose—it’s just an identifier for you to use.
Update the Service Name and Username in the Python Script
Replace "Redacted" in the following lines of the Python script with your service name:
Replace "(your user name)" in the following line with your Reddit username:
DEFAULT_USERNAME = "(your user name)"
Run the Python Script
After setting up everything, run the Python script. It will fetch all your Reddit comments and overwrite them with random sentences, then delete them.
Please remember, use this script responsibly. It will delete all of your Reddit comments, and the process is irreversible. Always double-check the script and make sure you’re ready to delete all comments before running it.
If you don’t want to trust a third-party service, here’s some really ugly code that I spun up quite a while ago when I still sucked at coding (even though I still do), along with some instructions that I chatGPT’d for it. It doesn’t handle your posts, only comments. I never had enough posts to bother when I could just do it by hand.
Still seems to work even with API restrictions, but maybe that’s because I didn’t hit the limit when I tested it out just now.
Sure, here are the steps you need to follow to use this script to overwrite and delete all comments from your Reddit account:
Prerequisites
This script requires Python and the following Python packages:
requests
,keyring
, andessential_generators
. You can install them using pip:Obtain your Reddit App’s Client ID and Secret
You need a Reddit app’s client ID and secret to use Reddit’s API. To obtain these, follow these steps:
http://localhost:8080
Save Your Client ID, Secret, and Refresh Token in Your Keyring
Use Python’s keyring package to securely save your Reddit app’s client ID, client secret, and Reddit account’s refresh token. You can use the following Python commands to store these values:
import keyring keyring.set_password("YourServiceName", "CLIENT_ID", "YourClientID") keyring.set_password("YourServiceName", "CLIENT_SECRET", "YourClientSecret") keyring.set_password("YourServiceName", "REFRESH_TOKEN", "YourRefreshToken")
Replace
"YourServiceName"
,"YourClientID"
,"YourClientSecret"
, and"YourRefreshToken"
with the actual service name, client ID, client secret, and refresh token. The service name can be any name you choose—it’s just an identifier for you to use.Update the Service Name and Username in the Python Script
Replace
"Redacted"
in the following lines of the Python script with your service name:CLIENT_ID=keyring.get_password("YourServiceName", "CLIENT_ID") CLIENT_SECRET=keyring.get_password("YourServiceName", "CLIENT_SECRET") REFRESH_TOKEN=keyring.get_password("YourServiceName", "REFRESH_TOKEN")
Replace
"(your user name)"
in the following line with your Reddit username:DEFAULT_USERNAME = "(your user name)"
Run the Python Script
After setting up everything, run the Python script. It will fetch all your Reddit comments and overwrite them with random sentences, then delete them.
Please remember, use this script responsibly. It will delete all of your Reddit comments, and the process is irreversible. Always double-check the script and make sure you’re ready to delete all comments before running it.