108

Does anyone know how to delete a project from a SonarQube server?

Thanks, Ronen.

rperez
  • 8,430
  • 11
  • 36
  • 44

13 Answers13

109

You have 2 ways to delete a project:

Ian W
  • 4,559
  • 2
  • 18
  • 37
Shawn Vader
  • 12,285
  • 11
  • 52
  • 61
18

Updated for Sonar 2.11:

  • Select the project (from the home page)
  • Then click on the Project Deletion link on the bottom of the left panel
  • Finally, confirm using the Delete Project button
Maxime Sinclair
  • 180
  • 1
  • 6
12

In Sonar 3.6, the deletion button is in the project page, under the search input, inside the menu Configuration (you must be logged as administrator):

enter image description here

Anton Rudeshko
  • 1,039
  • 2
  • 11
  • 20
jfcorugedo
  • 9,793
  • 8
  • 39
  • 47
  • 2
    Please note that this does not work in all browsers. On OS X, for example, it works with Firefox but not Chrome or Safari. This is an old bug from Sonar 3.x and is still present in 4.2. – RCross Apr 08 '14 at 09:44
9

Login with administrator account. Select the project name. There you can see "project deletion" under configuration menu.

sth
  • 222,467
  • 53
  • 283
  • 367
ѕтƒ
  • 3,547
  • 10
  • 47
  • 78
7

Login with an administrator account, then browse to the settings page of your project to get the button "delete project".

Simon Brandhof
  • 5,137
  • 1
  • 21
  • 28
  • for some reason, this button is absent. do you have an idea why? – rperez Sep 07 '10 at 15:15
  • Perhaps there is a sonar bug I am using sonar version 2.4.1 and I also have no idea how to delete the a project. No delete on the settings page of the project. Can you send a screen shot maybe we don't have ours set up correctly – Shawn Vader Dec 06 '10 at 15:56
  • Oops I am sorry I have just found it, I am sure it didn't show up the first time thou – Shawn Vader Dec 06 '10 at 15:57
6

In some situations that you want to make it programatically you can use the SonarQube's Rest Web API to do so. According to SonarQube documentation:

POST api/projects/bulk_delete

Which can be used by passing the project's ID in the "keys" parameter. I'm no pro in Curl but it should be something like this (code generated in the Postman client) for project with key "daBestProjectKey":

curl -X POST -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Cache-Control: no-cache" -H "Postman-Token: 10a0e9a1-8dae-a9d1-45f2-0d8e56de999d" -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" -F "keys=daBestProjectKey" "http://localhost:9000/api/projects/bulk_delete"
jonypera
  • 446
  • 2
  • 13
  • 23
4

[Home] button in top left corner >> [Projects] tab in top left corner >> (under name, click on the name of your project) >> [Project Deletion] (on the left panel/dashboard at the bottom) >> [Delete project] (in the center of the page, kind of).

user1467855
  • 3,843
  • 7
  • 28
  • 29
4

SonarQube 5.1

(released on April 23, 2015) Consider that you need to have administrative permissions. You can perform as described in the documentation:

enter image description here

thomas.mc.work
  • 6,404
  • 2
  • 26
  • 41
4

For SonarQube 5.1, following are the two options that can be followed:

From Project Settings

From Administrator's Global Settings

Robin Rizvi
  • 5,113
  • 4
  • 27
  • 35
4

Here is SonarQube version 4.4,

Seems each version the GUI is changed....

in project viewer --> configuration --> delete

vanduc1102
  • 5,769
  • 1
  • 46
  • 43
3

Here is the steps I use to DELETE any project from My SonarQube.

  1. Login as administrator
  2. Go to Administration -> Projects -> Projects Management
  3. Select the Project(s) you want to DELETE
  4. Click on Delete button at top right corner.

Fig - Deleteing a Project From SonarQube

spideringweb
  • 3,534
  • 2
  • 14
  • 17
1

This information is for SonarQube version 5.0 which is latest for now - Released on 17th January 2015

You can delete the project from Project Configuration which is present on right hand side of Project Dashboard.The same screenshot is attached below.

enter image description here

if you are an Administrator of SonarQube, the you have the authority to delete multiple projects.

Just go to settings and you see a tab on your left as "bulk deletion". Please find the attached screenshot for the same.

enter image description here

Abhijeet Kamble
  • 3,131
  • 2
  • 30
  • 36
1

Sonar Admin login with uwr: admin and pwd: admin (default one) --> Setting -->Bulk Deletion -->select projects you want to delete and delete.