The easiest way is to disable the folders from syncing on the server. See if your provider has an option to do that. Gmail allows that here in the webmail setting:
Otherwise, it is a little complicated, but I gave the solution here: IMAP folder subscription - #19 by Gary