Delete all users from firebase auth console

Maximus S picture Maximus S · Aug 6, 2016 · Viewed 30k times · Source

Is there an easy way to delete all registered users from firebase console? For example, I created a hundred users from my development environment, and now I want to delete all of them.

Answer

AAverin picture AAverin · Feb 26, 2017

As in updated answer, you can probably use firebase admin tools now, but if you don't want – here is a bit more solid javascript to remove users in the web:

var intervalId;

var clearFunction = function() {
  var size = $('[aria-label="Delete account"]').size()
  if (size == 0) {
    console.log("interval cleared")
    clearInterval(intervalId)
    return
  }
  var index = Math.floor(Math.random() * size)
  $('[aria-label="Delete account"]')[index].click();
  setTimeout(function () {
     $(".md-raised:contains(Delete)").click()
  }, 1000);
};

intervalId = setInterval(clearFunction, 300)

Just run it in developer tools