{"id":22514972,"url":"https://github.com/en9inerd/tgeraser","last_synced_at":"2026-04-20T06:05:10.412Z","repository":{"id":47236910,"uuid":"173650401","full_name":"en9inerd/tgeraser","owner":"en9inerd","description":"Tool to delete all your messages from chat/channel/conversation on Telegram without requiring admin privileges","archived":false,"fork":false,"pushed_at":"2024-10-08T04:17:56.000Z","size":147,"stargazers_count":41,"open_issues_count":1,"forks_count":8,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-31T09:03:46.918Z","etag":null,"topics":["automation","cleaner","cli","python","telegram","telegram-api","telethon","telethon-based"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/en9inerd.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,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-04T01:07:30.000Z","updated_at":"2025-03-28T19:10:14.000Z","dependencies_parsed_at":"2022-09-10T02:23:26.244Z","dependency_job_id":"b7268401-2011-4d96-b816-b395ef08ca8a","html_url":"https://github.com/en9inerd/tgeraser","commit_stats":{"total_commits":34,"total_committers":2,"mean_commits":17.0,"dds":0.1470588235294118,"last_synced_commit":"ab0e1605b5908422ee39e01fd73aa358ee03a0f3"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/en9inerd%2Ftgeraser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/en9inerd%2Ftgeraser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/en9inerd%2Ftgeraser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/en9inerd%2Ftgeraser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/en9inerd","download_url":"https://codeload.github.com/en9inerd/tgeraser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247631833,"owners_count":20970069,"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":["automation","cleaner","cli","python","telegram","telegram-api","telethon","telethon-based"],"created_at":"2024-12-07T03:27:12.469Z","updated_at":"2026-04-20T06:05:10.398Z","avatar_url":"https://github.com/en9inerd.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TgEraser\n\n[![PyPI version](https://badge.fury.io/py/tgeraser.svg)](https://badge.fury.io/py/tgeraser)\n\nTgEraser is a Python tool that allows you to delete all your messages from a chat, channel, or conversation on Telegram without requiring admin privileges. Official Telegram clients do not provide a one-click solution to delete all your messages; instead, you have to manually select and delete messages, with a limit of 100 messages per batch. TgEraser solves this problem and offers a convenient way to mass-delete your messages on Telegram.\n\n\u003e **Looking for a Go version?** Check out [go-tgeraser](https://github.com/en9inerd/go-tgeraser) — a Go implementation of this tool with pre-built binaries available.\n\n## Installation\n\n```\npip install tgeraser\ntgeraser\n```\n\nTo use TgEraser, you'll need to provide `api_id` and `api_hash`, which you can obtain from [here](https://my.telegram.org/auth?to=apps).\n\nThere are two methods to define `api_id` and `api_hash`:\n1. Set them as environment variables (`TG_API_ID` and `TG_API_HASH`).\n2. Allow the tool to prompt you for input during first execution, with an option to save the credentials in a `credentials.json` file located in the same directory as the sessions (by default, `~/.tgeraser/`).\nCredentials file can be created/edited manually in the following format:\n```json\n{\n    \"api_id\": 111111,\n    \"api_hash\": \"abcdef1234567890abcdef1234567890\"\n}\n```\n\n## Usage\n\n```\nTgEraser deletes all your messages from a chat, channel, or conversation on Telegram without requiring admin privileges.\n\nUsage:\n    tgeraser [(session \u003csession_name\u003e) --entity-type TYPE -l NUM -d PATH -p PEER_ID -o STRING -m TYPES --delete-conversation]\n    tgeraser session \u003csession_name\u003e -w [--entity-type TYPE -o STRING -m TYPES --delete-conversation]\n    tgeraser -h | --help\n    tgeraser --version\n\nOptions:\n    -d --directory PATH         Specify a directory where your sessions are stored. [default: ~/.tgeraser/]\n    -w --wipe-everything        Delete all messages from all entities of a certain type that you have in your dialog list.\n    --delete-conversation       If set, delete the whole conversation (only valid for user-type peers).\n    --entity-type TYPE          Available types: any, chat, channel, user. [default: chat]\n    -p --peers PEER_ID          Specify certain peers by comma (chat/channel/user).\n    -l --limit NUM              Show a specified number of recent chats.\n    -o --older-than STRING      Delete messages older than X seconds/minutes/hours/days/weeks.\n                                Example: --older-than \"3*days\" OR --older-than \"5*seconds\"\n    -m --media-type TYPES       Delete only specific media types (server-side filtering).\n                                Comma-separated list of: photo, video, audio, voice, video_note, gif, document.\n                                Use \"media\" to delete all media types. If not specified, deletes all messages.\n                                Example: --media-type \"photo,video\" OR --media-type media\n    -h --help                   Show this screen.\n    --version                   Show version.\n```\n\nExecuting the tool without options will guide you through the creation of your first user session. After that you can create sessions for multiple users using the `tgeraser session \u003cnew_session_name\u003e` command.\n\n## Contributing\n\nIf you have any issues or suggestions, please feel free to open an issue or submit a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fen9inerd%2Ftgeraser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fen9inerd%2Ftgeraser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fen9inerd%2Ftgeraser/lists"}