Not all folders are synchronised, max. 32 KiB loaded and only 25 mails displayed.
1GB can’t be just the current messages. All mails in the server occupy 3.6 GB. As I keep sending mails with larger attachments and then deleting them, I assume they remain in the memory.
Is there no way to clean up K9 or reset the IMAP accounts?
Otherwise I’ll have to delete the data with Android and then re-import the settings with K9.
You can tell it to compress the account in the settings. That will force K-9 to delete mails that do not match the settings (e.g., you shortened the time from 6 month to 1 month; K-9 will then delete the superfluous mails from the 5 month dropped out of the window). But I doubt that will solve your issue.
If you use IMAP then all mails are stored on server and K9 only keeps a local copy. In that case you could try to
Manage folders / folder / 3dot menu / Clear local messages.
This will delete the local copy in that folder and you can fetch the latest N mails from your server again