Say I have a lot of categories... is there a query I can run that will delete all but the five I specify?
I am not sure about mysql query but isn't it easier to delete in wp admin? Select all.. and de-select the 5 which you don't want to. and then delete.
That would work fine - except I don't see any select all option. Each category displays it's own delete button - there's no select all option on the page.
Ohh i didnt know that it's not at all possible in categories but is in blogroll. Check http://en.forums.wordpress.com/topic.php?id=6776&page&replies=2