LocalModerationMatrix is a simple tool to help you clean up message history and media in Matrix chat rooms. It runs on your computer and works with popular Matrix clients. The tool supports encrypted rooms, so your data stays private while you manage your space.
LocalModerationMatrix is a command-line program built for users who want a straightforward way to delete multiple messages or clear media files from Matrix rooms. Matrix is an open communication protocol that many rooms and chat apps use. This tool works offline and connects securely with Matrix servers, allowing you to clean rooms without opening each chat manually.
Features include:
- Bulk delete messages in one or many Matrix rooms.
- Remove unwanted media files like images and videos.
- Work with encrypted (E2EE) rooms safely.
- Compatible with popular Matrix apps such as Element, Cinny, Neochat, Nheko, and Schildichat.
- Operates via simple commands in a Windows terminal.
- Open source and community-driven.
LocalModerationMatrix runs on Windows computers. Your PC needs to meet these basic requirements:
- Windows 10 or later (64-bit recommended)
- At least 2 GB of free disk space
- 2 GHz or faster processor
- 4 GB or more of RAM
- Stable internet connection to interact with Matrix servers
- Permission to install software on your computer
You will access the tool through the Windows command prompt or PowerShell. No programming skills are necessary to use it.
Follow these steps to download, install, and run LocalModerationMatrix on your Windows PC.
Click the big green button near the top or visit this link to get the tool:
Download LocalModerationMatrix
This page contains the latest version of the program ready to download.
Once downloaded, the file will likely be a ZIP archive.
- Right-click the ZIP file.
- Select "Extract All..."
- Choose a folder to extract to (for example, your Desktop).
- Click "Extract."
You will use the command-line tool to run LocalModerationMatrix.
- Press
Win + Rkeys. - Type
cmdand press Enter. - A black window called Command Prompt will open.
In Command Prompt, move to where you extracted the files.
For example, if you put the folder on your Desktop and the folder is named LocalModerationMatrix:
cd Desktop\LocalModerationMatrix
Press Enter.
Type the following command and press Enter:
python local_moderation.py
(LocalModerationMatrix requires Python 3.6 or newer installed.)
If Python is not installed, you will see an error. In that case, install Python first from https://www.python.org/downloads/windows/
You do not need to know how to code. The tool operates by typing simple commands in the console.
Before working, you must log in by entering your Matrix username and password.
The program will ask for:
- Your Matrix ID (e.g.,
@username:matrix.org) - Your password
- The homeserver address (usually
https://matrix.orgor your own server)
After logging in, you will see a list of rooms you belong to. Select one or more rooms for deleting messages or cleaning media.
You can:
- Delete messages older than a specific date.
- Remove all media in the room.
- Delete messages from a specific user.
The tool will ask you to type "yes" to confirm the action. It will then process your request. Progress is shown in the command window.
- Ensure your Matrix account has permission to moderate the selected rooms.
- For encrypted rooms, you may need to provide your encryption keys.
- Running the tool may take some time if the room has many messages or media.
- Use an up-to-date Python installation with the required packages. The README inside the folder contains commands to install these.
- Your computer must remain online during the moderation process.
If you do not have Python installed, follow this:
- Go to https://www.python.org/downloads/windows/
- Download the latest stable version (3.9 or newer preferred).
- Run the installer.
- Make sure to check "Add Python to PATH" during setup.
- After installation, open Command Prompt and type:
python --version
You should see the Python version number.
LocalModerationMatrix may require some helper libraries. In Command Prompt, run:
pip install -r requirements.txt
Make sure the requirements.txt file is inside the program folder.
LocalModerationMatrix never stores your password permanently. Your credentials only stay in memory during the session.
All communication uses secure connections to your Matrix homeserver.
When working on encrypted rooms, your device handles encryption, keeping your data private.
For detailed instructions about command options, visit the program documentation on the download page. It contains examples and troubleshooting advice.
If you encounter problems like login errors or connection issues, check your internet and server settings.