Can't delete team (neither in the Contacts app nor in administrational settings)

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • Nextcloud Hub 26 Summer (35.0.2)
  • Operating system and version (e.g., Ubuntu 24.04):
    • Ubuntu 24.04.
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • AIO

Summary of the issue you are facing:

I was checking out the abilities of the Teams app to see how I could use it best and created a team for testing purposes called “Test123”. Now, that I don’t need it any more I would like to delete it but whenever I try to delete it I get an error popup stating: “Unable to delete the team.”

This happens both in the Contacts app, as well as in the Teams section of the administrational settings.

Looking at the error in the log it seems I’m trying to delete the team with the wrong app, but isn’t Circles outdated, at least I can’t install it anymore.

Steps to replicate it (hint: details matter!):

  1. Open the contacts app or the administrational settings

  2. Navigate to teams

  3. Attempt to delete a team

Log entry Nextcloud

[circles] Error: {"circleId":"bzCyNn8dGh9O4qfXBI8z7GZCc9vGcEf"}
	DELETE /ocs/v2.php/apps/circles/circles/bzCyNn8dGh9O4qfXBI8z7GZCc9vGcEf

The “circles” in the log is fine. Teams is the Circles app under the hood (it’s bundled with the server, so there’s nothing to install). The log line is just the Teams backend refusing the delete.

There’s an open bug for exactly this on 35 (nextcloud/circles issue #2909): deleting from the admin Teams page or Contacts only works if you’re the owner of the team. As an admin or moderator of the team you just get “Unable to delete the team” with nothing useful in the log. Two ways out:

  1. Log in as the user who created “Test123” and delete it from Contacts → Teams. Or have the owner transfer ownership to you first.
  2. Or do it from the CLI. On AIO:
sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ circles:manage:list
sudo docker exec --user www-data -it nextcloud-aio-nextcloud php occ circles:manage:destroy bzCyNn8dGh9O4qfXBI8z7GZCc9vGcEf

(The ID is the one from your log. Without --initiator, the command acts as the team owner, which is why it works where the UI doesn’t.)

If it still refuses: check whether you opened a Collective for that team at some point. A linked Collective also blocks deleting the team until the Collective is deleted.

Thank you, I’ll try that and report back.

In the Contacts app, I don’t see a section for Teams. However, Teams show up in the App drawer as their own entry. So, I tried deleting it there. I’m still getting the error here. Also, if I’m trying to do this with an account that is not the owner of the team, I can’t even see the “Team settings”, so I guess it is impossible trying to delete the team as a non-owner anyway.

I guess this means, that this should apply:

I did indeed create a test123 collective as well, but I had already deleted it. I double checked and realized it was still listed in the “Deleted collectives” and could be restored from there. When I clicked on the “permanently delete” button here I already got the option to delete the team directly with it.

And it worked just fine.

Thank you so much, marked your post as the solution :slight_smile:

Glad it worked, and thanks for reporting back. Good to know a soft-deleted Collective still blocks deleting the team until it’s purged from Deleted collectives. That will help the next person who hits this.