Hi @mablae,
It is possible to manually manipulate the database to remove a team and I’ll show you how below. First though, a warning that any database manipulation is NOT recommended, especially if you have critical data you don’t want to lose.
That said if you’re using MySQL you can remove a team by doing the following:
- Login to MySQL with
mysql --host=dockerhost --user=mmuser --password=mostest
i. This might bemysql --host=localhost --user=mmuser --password=mostest
if you’re running release bits. - Select the database with
use mattermost_test;
i. The database name might also bemattermost
ormattermost_production
- Find the team Id with
SELECT Id FROM Teams WHERE Name = 'someteamname';
and copy it - Delete the team with
DELETE FROM Teams WHERE Id = 'yourteamid';
- Delete the users with
DELETE FROM Users WHERE TeamId = 'yourteamid';
- Delete the sessions with
DELETE FROM Sessions WHERE TeamId = 'yourteamid';
- (Optional) Delete the channels with
DELETE FROM Channels WHERE TeamId = 'yourteamid';
- Restart your server to clear the sessions cache.
Doing this might have unintended side effects, so it’s up to you whether or not to do it. The steps for Postgres should be very similar.