How To Delete Bugs in Bugzilla

A regular questions that comes up regarding Bugzilla is: “How do I delete bugs in Bugzilla?”

The standard answer is that you don’t and you shouldn’t. They usually give good reasons like maintaining history etc. However, there are certainly times (although infrequent) when it is appropriate to delete a bug.

There are some administrative settings you will most like have to change before you can delete a bug. (note: I am referring to Bugzilla 3.4.6) Log in with an account belonging to the admin group and navigate to the Administration page. Then go to the Parameters page. Finally choose the Administrative Policies link. (Administration -> Parameters -> Administrative Policies)

Now you will see the allowbugdeletion parameter which is most likely set to off unless you’ve been fiddling with it while trying to delete a bug. Change the parameter to on and click Save Changes. There is a key hint in the description of this parameter.

The pages to edit products and components can delete all associated bugs when you delete a product (or component). Since that is a pretty scary idea, you have to turn on this option before any such deletions will ever happen.

Note the bolded phrase.  You can’t directly delete bugs, you must assign a bug to a component or product and delete it. This bears repeating – you cannot delete a bug directly.

The easiest way is to create a component in the product with the bugs you want to delete. Call it “Trash” or something equally descriptive. Now find the bugs you want to delete and change their component to “Trash”.

Once you have added all the soon to be deleted bugs to your trash component go back to the component list in the administration page (Administration -> Products -> <your product> -> Edit Components). You should see an “Action” column on the far right of the table with all your components with a Delete link. Find your trash component and click the associated “Delete” link.

You will be presented with a confirmation page with a big red warning telling you how many bugs will be deleted. You can view the bug list to verify or just click the “Yes delete” button.

Your bugs are now deleted.

You will most like want to turn the allowbugdeletion parameter off again to prevent accidents.

Tired of managing your Bugzilla? We are the experts at hosting Bugzilla. Free migration from your existing Bugzilla. We keep everything patched, updated, backed up and running fast.

Find out more