I'm sure I'm not the only one who has added a community only to find it doesn't federate or something.

I went directly into postgresql and checked it out, the list of communities is held in the communities table.

The following will list the addresses of each community you're connected to:

SELECT ap_id from community;

From there, you can select the address and use the following to delete the community if nobody is following it and there are no replies to it:

delete from community where ap_id = '[URL of community]';

From here on out, you should tread carefully, you're going to be fiddling with user accounts and posts which may not be kosher

If there are any users following the community then it'll give you an error message like:

ERROR: update or delete on table "community" violates foreign key constraint "community_follow_community_fkey" on table "community_follow"

DETAIL: Key (id)=([ID Number]) is still referenced from table "community_follow".

At that point, you'll need to erase the message from the notification table

delete from community_follow where community = '[ID Number]';

If there are any replies in history it'll give you an error message like:

ERROR: update or delete on table "reply" violates foreign key constraint "notification_parent_reply_fkey" on table "notification"

DETAIL: Key (id)=([ID Number]) is still referenced from table "notification".

At that point, you'll need to erase the message from the notification table

delete from notification where parent_reply=[ID Number];

or alternatively:

delete from notification where reply=[ID Number];

You may need to remove people following the community once, and you may need to erase a lot of replies until you can finally erase the community.

Like I said before, tread carefully; you're directly fiddling with data.