How can I bulk delete users in JIRA?

Anthony Kong September 15, 2011

Basically I want to remove all user records in one go. I am using HSQL at the moment (so SQL operation is probably not feasible)

3 answers

1 accepted

1 vote
Answer accepted
Bob Swift (personal)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 15, 2011

JIRA Command Line Interface has remove user actions. You can use runFromSql action can be used to drive it or files. JIRA rules for deleting a user are enforced by JIRA same as the UI, so you can't delete users with issues etc...

0 votes
Danilo Conrad
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 28, 2014

Another alternative to the CLI plugin would be writing a script and using the JIRA REST API:

The feature request raised for bulk deleting users in JIRA is https://jira.atlassian.com/browse/JRA-8047, and you may vote on it to increase its visibility with our developers.

Tony
Contributor
December 12, 2014

Do you anyone who has such a script? If not, what scripting language would you recommend?

Richard Cross
Contributor
October 12, 2015

That JIRA has been open for 10 years... I highly doubt it will be actioned.

0 votes
muschol
Contributor
September 15, 2011

If you are comfortable doing it via SQL, you can run the HSQL database manager up as follows:

java -cp <path_to_jira_standalon>/lib/hsqldb-1.8.0.5.jar org.hsqldb.util.DatabaseManager -user sa -url jdbc:hsqldb:jiradb

Last time I tried this was with 4.0, but I think it still works.

I think you have to stop Jira first, start HSQL as shown above, make the changes, save them, and then start Jira again.

As always, I'd recommend you backup your Jira first.

Hope this helps.

Matt

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events