Normally you don’t need to remove a ticket from Trac, you can mark it as duplicated or invalid and close it. This can be done with the web interface and is a normal operation. It is a better option because all the process is documented and searchable. For example someone reports a bug, which is not really a bug, but a misunderstanding of the specifications. In this case I’ll add the explanation in the comments and mark the ticket as invalid.

However there are times that really requires to delete a ticket. For example, as I’m working on multiple projects, I’ve added by mistake a ticket to the wrong Trac project. I don’t want a customer to see a to do item for another project, obviously. So in cases like this, it’s possible to use the trac-admin command:

$ cd /var/projects/trac/
$ sudo trac-admin obliquid
Welcome to trac-admin 0.12
Interactive Trac administration console.
Copyright (c) 2003-2010 Edgewall Software

Type:  '?' or 'help' for help on commands.

Trac [/var/projects/trac/obliquid]> ticket remove 16
Ticket #16 and all associated data removed.

Where in this case obliquid is the project name and 16 the ticket number of the ticket I want to remove.