The best way (read: cleanest) is to use the ui to delete them from the ticket list page. If you have a ton of tickets this might not be realistic as you can only do 50 at a time (you would have to change your settings in my preferences to display 50). If you have a back up (or can make one) you might be able to drop all the tables and then restore just the ones that contain information you want to keep. (config, staff, users, groups, departments, etc.)