2023-02-20 07:29:13 -07:00
_This [blog post by Jackson Chen ](https://jacksonchen666.com/posts/2022-12-03/14-33-00/ ) (Dec 2022) explains how to use many of the tools listed on this page. There is also an [earlier blog by Victor Berger ](https://levans.fr/shrink-synapse-database.html ) (June 2020), though this may be outdated in places._
2021-12-01 11:12:19 -07:00
# List of useful tools and scripts for maintenance Synapse database:
## [Purge Remote Media API](../../admin_api/media_admin_api.md#purge-remote-media-api)
The purge remote media API allows server admins to purge old cached remote media.
2021-12-02 10:46:20 -07:00
## [Purge Local Media API](../../admin_api/media_admin_api.md#delete-local-media)
This API deletes the *local* media from the disk of your own server.
2021-12-01 11:12:19 -07:00
## [Purge History API](../../admin_api/purge_history_api.md)
The purge history API allows server admins to purge historic events from their database, reclaiming disk space.
## [synapse-compress-state](https://github.com/matrix-org/rust-synapse-compress-state)
Tool for compressing (deduplicating) `state_groups_state` table.
2021-12-02 10:46:20 -07:00
## [SQL for analyzing Synapse PostgreSQL database stats](useful_sql_for_admins.md)
2023-02-20 07:29:13 -07:00
Some easy SQL that reports useful stats about your Synapse database.