Skip to main content

Overview

The delete command permanently removes a tweet from your account. This action cannot be undone.
Destructive Operation: Deleting a tweet is permanent and irreversible. The tweet will be removed from Twitter’s servers and cannot be recovered.

Usage

twitter delete <tweet_id>
Delete a tweet by its numeric ID. The command will prompt for confirmation before proceeding.

Examples

Delete a Tweet with Confirmation

twitter delete 1234567890123456789
Output:
Are you sure you want to delete this tweet? [y/N]: y
🗑️ Deleting tweet 1234567890123456789...
✅ Done.

Cancel Deletion

twitter delete 1234567890123456789
Are you sure you want to delete this tweet? [y/N]: n
Aborted.

Command Reference

Arguments

  • tweet_id (required): The numeric ID of the tweet to delete

Confirmation

The command includes a built-in confirmation prompt to prevent accidental deletions. You must type y or yes to proceed.
The confirmation prompt is a safety feature. Always verify you have the correct tweet ID before confirming deletion.

Finding Tweet IDs

You can find the tweet ID of your own tweets in several ways:

From Tweet URL

https://x.com/your_username/status/1234567890123456789
                                   └─ This is the tweet ID

Using the CLI

# View your recent tweets
twitter user-posts your_username

# Find the tweet you want to delete and note its ID

From Web Interface

  1. Open the tweet on x.com
  2. Look at the URL in your browser
  3. Copy the numeric ID at the end

Limitations

You can only delete your own tweets. Attempting to delete someone else’s tweet will result in an error.

Cannot Delete

  • Tweets from other users
  • Tweets you’ve retweeted (use unretweet instead)
  • Tweets from suspended or deleted accounts
  • Already deleted tweets

Error Handling

Common Errors

Tweet not found:
 Twitter API error 404: Tweet not found
Possible causes:
  • Tweet ID is incorrect
  • Tweet was already deleted
  • Tweet belongs to another user
Permission denied:
 Twitter API error 403: You cannot delete this tweet
Causes:
  • Tweet belongs to another user
  • Authentication token doesn’t have delete permissions
Rate limited:
 Rate limited: Try again later (recommended wait: 15+ minutes)
Causes:
  • Too many delete operations in a short time
  • Exceeded Twitter’s API rate limits

Rate Limits and Anti-Detection

Rate Limits: While Twitter doesn’t officially document delete rate limits, excessive deletion activity may trigger anti-spam protections.
Anti-Detection Features:
  • Random delays (1.5-4 seconds) after deletion
  • Chrome TLS fingerprint impersonation
  • Automatic retry with exponential backoff
  • Transaction ID generation for authenticity
Safe deletion patterns:
  • Maximum: 10-15 deletions per 15 minutes
  • Add delays between deletions (a few seconds to minutes)
  • Avoid deleting all tweets in rapid succession
If rate limited:
  • Wait at least 15-20 minutes
  • The CLI will automatically retry with exponential backoff
  • Consider spreading deletions over a longer time period

Bulk Deletion

Use with Caution: Bulk deletion scripts can trigger rate limits and anti-spam detection. Always add delays between operations.
If you need to delete multiple tweets:
# Delete tweets one at a time with manual delays
twitter delete 1234567890123456789
# Wait a few seconds/minutes
twitter delete 9876543210987654321

Scripted Approach

#!/bin/bash
# delete_multiple.sh

TWEET_IDS=("123456789" "987654321" "555555555")

for id in "${TWEET_IDS[@]}"; do
  echo "Deleting tweet $id..."
  twitter delete "$id" --yes  # Note: --yes flag doesn't exist yet
  echo "Waiting 30 seconds..."
  sleep 30
done
The CLI does not currently support a --yes flag to skip confirmation. Each deletion requires manual confirmation for safety.

Impact of Deletion

What Gets Deleted

  • The tweet content
  • All engagement metrics (likes, retweets, replies counts)
  • The tweet from your profile
  • The tweet from Twitter search results
  • The tweet from followers’ timelines

What Doesn’t Get Deleted

  • Replies: Other users’ replies may remain visible
  • Screenshots: Users may have captured your tweet
  • Retweets: Existing retweets may take time to clear
  • Quotes: Quote tweets of your content may still exist
  • Archives: Third-party archives may have saved your tweet
Internet Permanence: Once posted, content may be cached, archived, or screenshotted. Deletion removes it from Twitter but doesn’t guarantee complete removal from the internet.

Best Practices

  1. Double-check the ID: Always verify the tweet ID before confirming deletion
  2. Archive first: Consider exporting important tweets before deletion
  3. Avoid bulk deletion: Delete tweets gradually to avoid rate limits
  4. Use bookmarks: Review tweets via twitter user-posts before deleting
  5. Add delays: Wait 30-60 seconds between deletions when removing multiple tweets

Alternative: Tweet Management

Instead of deleting, consider:
  • Making your account private
  • Using Twitter’s native archive features
  • Exporting tweets with twitter user-posts --json -o my_tweets.json
  • Reviewing engagement before deletion

Build docs developers (and LLMs) love