How can I delete a channel? (old but gold)

I guess it has been asked many times. I couldn’t find a solution even though I browsed many of them on the forum. Although I researched in detail, I could not figure out how to delete the created channel? Shouldn’t this be very easily accessible? Starting a demo channel turns into a nightmare. Is there anyone who can help with this?

mmctl can do that:

# mmctl --local channel delete --help
Permanently delete some channels.
Permanently deletes one or multiple channels along with all related information including posts from the database.

  mmctl channel delete [channels] [flags]

  channel delete myteam:mychannel

      --confirm   Confirm you really want to delete the channel and a DB backup has been performed.
  -h, --help      help for delete

Global Flags:
      --config string                path to the configuration file (default "$XDG_CONFIG_HOME/mmctl/config")
      --disable-pager                disables paged output
      --insecure-sha1-intermediate   allows to use insecure TLS protocols, such as SHA-1
      --insecure-tls-version         allows to use TLS versions 1.0 and 1.1
      --json                         the output format will be in json format
      --local                        allows communicating with the server through a unix socket
      --quiet                        prevent mmctl to generate output for the commands
      --strict                       will only run commands if the mmctl version matches the server one
      --suppress-warnings            disables printing warning messages

How will the end user do these to delete the channel?

The end user is not supposed to delete channels, they can only close, archive and leave channels.

I meant us as the end user. For example, a user whom I assigned as a channel manager cannot delete the channel or why can’t I simply delete the channel I created incorrectly through the application??

I don’t know the reasoning behind that, but there are separate permissions available to control channel deletion as you can see in the API docs:

Interestingly, in the GUI I cannot find a permission to allow channel deletions for anyone, so not sure what permission maybe would include that. You can try to run the delete API call (or use mmctl channel delete with one of your user accounts to see if it works for you; there’s no way in the GUI to do that though, so you would have to either use the API or mmctl and full channel deletion via API needs to be enabled first in your config.json (as documented in the API).

The permission in question should be the “Archive Channels” permission in system console:

So if a user has this permission and the config value ServiceSettings.EnableAPIChannelDeletion is set to true, it should be possible for them to delete the channel using either the API or mmctl.