This Python script uses the Telethon library to connect to your Telegram account and delete all messages from all your conversations. Please note that this action is irreversible, and all messages in your chats will be permanently deleted.
Before running the script, make sure you have the following:
- Telegram API credentials (API ID and API hash). You can obtain them by creating a new application on the Telegram website.
- Python installed on your machine.
-
Clone this repository to your local machine.
git clone https://github.com/sahiljani/telegram-messages-cleaner.git
-
Install the required Python packages.
pip install telethon
-
Run the script.
python delete_messages.py
-
Enter your Telegram API credentials (API ID and API hash) and your phone number when prompted.
-
The script will connect to your Telegram account and delete all messages in your conversations.
- Use this script at your own risk. Deleting messages is irreversible, and there is no way to recover them.
- Ensure you have a backup of any important information before running the script.
Feel free to contribute to this project by opening issues or creating pull requests. Any suggestions or improvements are welcome!