[Yandex Cloud documentation](../../../index.md) > [Yandex Cloud Stackland](../../index.md) > [Step-by-step guides](../index.md) > Databases > Managed Service for PostgreSQL > Deleting a user

# Deleting a PostgreSQL user

If you have a PostgreSQL user in your [cluster](../../concepts/components/postgresql.md), you can delete it.

## Using the CLI {#cli}

1. Find the name of the resource in the list of project users: `kubectl get PostgresqlRole -n <project_name>`.
1. Delete the resource: `kubectl delete PostgresqlRole <resource_name> -n <project_name>`.

Once deleted, the role can no longer connect to PostgreSQL or use any granted permissions. If the Kubernetes Secret containing the user password is associated with the `PostgresqlRole` resource through `ownerReferences`, it is automatically deleted together with the resource. If the Secret was created separately, delete it using the `kubectl delete Secret <sectet_name> -n <project_name>` command.