A script to delete old posts on your GoToSocial server, helping keep your Fediverse clean and efficient.
The script is forked from xurxia/gts-cleaner and heavily vibe-coded. Use at your own risk!
- Automated cleanup: Removes old posts based on a date range or customizable conditions.
- Flexible configuration: Define which posts to keep and which to delete.
- Compatibility: Specifically designed for GoToSocial servers.
- Python 3.7 or higher.
- API access to your GoToSocial server with appropriate permissions.
-
Clone the repository:
git clone https://github.com/kpocius/gts-cleaner.git cd gts-cleaner -
Install the required dependencies:
pip install -r requirements.txt
-
Configure your access credentials and parameters in the config.json file:
{ "language": "en", "server_url": "https://your-server.social", "access_token": "your-access-token", "delete_older_than_days": 30, "dryrun": true } -
Run the script
python main.py
-
If you are happy with Dry Run results, set
"dryrun": falseand run it again.
- This script permanently deletes posts! Make sure to run it with
"dryrun": truefirst. - Back up any important data if necessary.
Contributions are welcome! If you have ideas to improve this project, feel free to open an issue or submit a pull request.
This project is licensed under the MIT License.