Offlineimap becomes quite slow when you have so many (empty folders), this is how you can delete them.
The blog post is based on a (now offline) article by Matt Palma.
Disclaimer:
Besure to double and triple check every command, actions on the remote are permanent. If you want to …