You can drop custom roles but not default roles. You can use the DROP ROLE statement to drop a role that you no longer need.
Prerequisites
You have the DROP ANY ROLE system privilege and the WITH ADMIN OPTION privilege on the role to be dropped.
For information about how to view your privileges, see View user privileges. If you do not have the required privilege, contact the administrator to obtain the privilege. For more information about how to grant privileges to a user, see Grant direct privileges.
Considerations
When you drop a role, the system revokes the role from all users and roles and then drops the role from the database.
Notice
Dropping a role does not affect user sessions in which the role is enabled. However, after the role is dropped, the role can no longer be enabled in new user sessions.
Syntax and examples
The SQL syntax is as follows:
obclient> DROP ROLE role_name;
Here is an example:
obclient> DROP ROLE role1;
Query OK, 0 rows affected
For more information about the DROP ROLE statement, see DROP ROLE.