# Ansible Galaxy role removal

**URL:** <https://forum.ansible.com/t/ansible-galaxy-role-removal/25142>\
**Category:** Ansible Project\
**Tags:** galaxy-ng\
**Created:** [August 1, 2017, 3:16am UTC](https://forum.ansible.com/t/ansible-galaxy-role-removal/25142 "2017-08-01T03:16:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rahul\_Mohandas](https://avatars.discourse-cdn.com/v4/letter/r/f14d63/32.png) [@Rahul\_Mohandas](https://forum.ansible.com/u/Rahul_Mohandas)\
**Post date:** [August 1, 2017, 3:16am UTC](https://forum.ansible.com/t/ansible-galaxy-role-removal/25142/1 "2017-08-01T03:16:27Z")

</div>

Hello,

I have noticed an issue caused by user error. It would be great if some admin could help me resolve this issue. Based on the source code it seems someone with “admin” would be able to delete this erroneous role.

If you try to import a role through command line and include the --role-name and you provide incorrect arguments it will timeout the import and key the role-name locked

example:

```auto
ansible-galaxy import rahul0705 rahul0705/ansible-certbot --role-name certbot

```

This was a mistake (the extra username in the repo field). This creates the following log:

```auto
Starting import 99571: role_name=certbot repo=rahul0705/rahul0705/ansible-certbot

```

Once that times out we still cannot use the certbot role name in the rahul0705 namespace.

```auto
Starting import 99568: role_name=ansible-certbot repo=rahul0705/ansible-certbot
Accessing branch: master
Parsing and validating meta data.
Setting role name to certbot
Parsing galaxy_tags
Parsing platforms
Adding dependencies
Parsing and validating README
Adding repo tags as role versions
Removing old tags
Import completed
Status SUCCESS : warnings=0 errors=0
Error saving role: duplicate key value violates unique constraint "main_role_namespace_36aa1070a7d8dc70_uniq" DETAIL: Key (namespace, name)=(rahul0705, certbot) already exists.

```
