{"id":13551276,"url":"https://github.com/koenrh/delete-tweets","last_synced_at":"2025-04-08T13:05:42.272Z","repository":{"id":15901629,"uuid":"18643145","full_name":"koenrh/delete-tweets","owner":"koenrh","description":"Delete tweets from your timeline.","archived":false,"fork":false,"pushed_at":"2022-11-19T20:14:43.000Z","size":97,"stargazers_count":789,"open_issues_count":25,"forks_count":105,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-01T11:04:56.813Z","etag":null,"topics":["python","twitter"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/koenrh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-10T16:17:33.000Z","updated_at":"2025-03-30T19:27:43.000Z","dependencies_parsed_at":"2023-01-13T18:37:08.513Z","dependency_job_id":null,"html_url":"https://github.com/koenrh/delete-tweets","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koenrh%2Fdelete-tweets","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koenrh%2Fdelete-tweets/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koenrh%2Fdelete-tweets/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koenrh%2Fdelete-tweets/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koenrh","download_url":"https://codeload.github.com/koenrh/delete-tweets/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247847609,"owners_count":21006099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","twitter"],"created_at":"2024-08-01T12:01:45.404Z","updated_at":"2025-04-08T13:05:42.251Z","avatar_url":"https://github.com/koenrh.png","language":"Python","funding_links":[],"categories":["Python","twitter"],"sub_categories":[],"readme":"# delete-tweets\n\n![](https://github.com/koenrh/delete-tweets/workflows/build/badge.svg)\n[![PyPI version](https://badge.fury.io/py/delete-tweets.svg)](https://badge.fury.io/py/delete-tweets)\n\nThis is a simple script that helps you delete tweets (or just replies or retweets)\nfrom your timeline. There are quite a few third-party services that allow you\nto delete tweets, but these very likely will not allow you to delete tweets beyond\nthe infamous [3,200 tweet limit](https://web.archive.org/web/20131019125213/https://dev.twitter.com/discussions/276).\n\n## Prerequisites\n\nUnfortunately, as of late 2018, you are required to have a Twitter Developer account\nin order to create a Twitter app.\n\n### Apply for a Twitter Developer account\n\n1. [Create a Twitter Developer account](https://developer.twitter.com/en/apply):\n    1. **User profile**: Use your current Twitter @username.\n    1. **Account details**: Select *I am requesting access for my own personal use*,\n      set your 'Account name' to your @username, and select your 'Primary country\n      of operation.\n    1. **Use case details**: select 'Other', and explain in at least 300 words that\n      you want to create an app to semi-automatically clean up your own tweets.\n    1. **Terms of service**: Read and accept the terms.\n    1. **Email verification**: Confirm your email address.\n1. Now wait for your Twitter Developer account to be reviewed and approved.\n\n### Create a Twitter app\n\n1. [Create a new Twitter app](https://developer.twitter.com/en/apps/create) (not\n  available as long as your Twitter Developer account is pending review).\n1. Set 'Access permissions' of your app to *Read and write*.\n\n### Configure your environment\n\n1. Open your Twitter Developer's [apps](https://developer.twitter.com/en/apps).\n1. Click the 'Details' button next to your newly created app.\n1. Click the 'Keys and tokens' tab, and find your keys, secret keys and access tokens.\n1. Now you need to make these keys and tokens available to your shell environment.\n  Assuming you are using [Bash](https://en.wikipedia.org/wiki/Bash_(Unix_shell)):\n\n:warning: Before you continue, you should be aware that most shells record user\ninput (and thus secrets) into a history file. In Bash you could prevent this by\nprepending your command with a _single space_ (requires `$HISTCONTROL` to be set\nto `ignorespace` or `ignoreboth`).\n\n```bash\nexport TWITTER_CONSUMER_KEY=\"your_consumer_key\"\nexport TWITTER_CONSUMER_SECRET=\"your_consumer_secret\"\nexport TWITTER_ACCESS_TOKEN=\"your_access_token\"\nexport TWITTER_ACCESS_TOKEN_SECRET=\"your_access_token_secret\"\n```\n\n### Get your tweet archive\n\n1. Open the [Your Twitter data page](https://twitter.com/settings/your_twitter_data)\n1. Scroll to the 'Download your Twitter data' section at the bottom of the page\n1. Re-enter your password\n1. Click 'Request data', and wait for the email to arrive\n1. Follow the link in the email to download your Tweet data\n1. Unpack the archive\n\n## Getting started\n\n### Installation\n\nInstall the tool using [`pip`](https://pip.pypa.io/).\n\n```bash\npython3 -m pip install delete-tweets\n```\n\n### Usage\n\nDelete any tweet from _before_ January 1, 2018:\n\n```bash\ndelete-tweets --until 2018-01-01 tweet.js\n```\n\nOr only delete all retweets:\n\n```bash\ndelete-tweets --filter retweets tweet.js\n```\n\n### Spare tweets\n\nYou can optionally spare tweets by passing their `id_str`, setting a minimum\namount of likes or retweets:\n\n```bash\ndelete-tweets --until 2018-01-01 tweet.js --spare-ids 21235434 23498723 23498723\n```\n\nSpare tweets that have at least 10 likes, or 5 retweets:\n\n```bash\ndelete-tweets --until 2018-01-01 tweet.js --spare-min-likes 10 --spare-min-retweets 5\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoenrh%2Fdelete-tweets","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoenrh%2Fdelete-tweets","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoenrh%2Fdelete-tweets/lists"}