Setup & Installation
Install Python 3 and pip
You need to install Python 3 to use
ephemetoot. Python 2 is now end-of-life, however it continued to be installed as the default Python on MacOS and many Linux distributions until very recently, so you should check.
These instructions use the command
pip - depending on your setup you may need to use
Install ephemetoot from pypi
pip install ephemetoot
If you do not have permission to install python modules, you may need to use the
--user flag. Generally this is not advisable, since you will need to run ephemetoot with the same user since it will only be installed for that user and not globally:
pip install ephemetoot --user
Obtain an access token
Now you’ve installed
ephemetoot, in order to actually use it you will need an application “access token” from each user. Log in to your Mastodon account using a web browser:
- Click the
- Click on
- Enter an application name (e.g. ‘ephemetoot’)
- The following ‘scopes’ are required:
- Click on the name of the new app, which should be a link
- Copy the
Your access tokenstring - you will need this for your configuration file (see below)
NOTE: Anyone who has your access token and the domain name of your Mastodon server will be able to:
- read all your private and direct toots,
- publish toots and DMs from your account, and
- read everything in your account settings.
Do not share your access token with anyone you do not 100% trust!!!.
Configuration for each user is set up in the
config.yaml file. This uses yaml syntax and can be updated at any time without having to reload
You can create a config file by hand, but the easiest way to do it is with the
This will ask you to fill in information for each part of the file:
|access_token||required - The alphanumeric access token string from the app you created in Mastodon|
|username||required - Your username without the ‘@’ or server domain. e.g.
|base_url||required - The base url of your Mastodon server, without the ‘https://’. e.g.
|days_to_keep||Number of days to keep toots e.g.
|toots_to_keep||A list of toot ids indicating toots to be kept regardless of other settings. The ID of a toot is the last part of its individual URL. e.g. for https://ausglam.space/@hugh/101294246770105799 the id is
|hashtags_to_keep||A list of hashtags, where any toots with any of these hashtags will be kept regardless of age. Do not include the ‘#’ symbol. Do remember the rules for hashtags|
|visibility_to_keep||Toots with any of the visibility settings in this list will be kept regardless of age. Options are:
|archive||A string representing the filepath to your toot archive. If this is provided, for every toot checked, the full toot is archived into individual files named by the toot’s
All values other than
base_url are optional, however if you include
visibility_to_keep you must make each a list, even if it is empty:
toots_to_keep: # this is not a list, it will throw an error hashtags_to_keep: - # this empty list is ok visibility_to_keep: [ ] # this empty list is also ok
As of version 2, you can use a single
ephemetoot installation to delete toots from multiple accounts. If you want to use
ephemetoot for multiple accounts, separate the config for each user with a single dash (
-), and add the additional details, as shown in the example file.