How to uninitialize an already initialized vault?

After initializing vault via code,Is there anyway to uninitialize the vault ? (i.e.) to set ‘Initialized= “false”’

key, err := client.Sys().Init(res)
	if err != nil {
		log.Fatal("Error while initializing", err)
	}
	if !status.Initialized {
		log.Fatal("Vault server is not initialized")
	}

Above is the go code used

To do that you would shut down the entire Vault cluster and manually erase all data in its storage backend.

Can you elaborate on how I can achieve that?

I don’t think I can, actually, as much further elaboration would depend on information I do not have, about how exactly your Vault is deployed and managed (e.g. Linux VMs managed by systemd, Kubernetes, etc.) and which Vault storage backend is in use.

Absent that information, I can only rephrase what I said:

  • Shut down your Vault server processes
  • Throw away all your data
  • Continue as if you were deploying Vault from scratch