* Primarily: This is a very close synonym, so its antonym is essentially the opposite - secondarily, subsidiarily, incidentally.
* Mainly: Similar to "chiefly", so antonyms could be marginally, minimally, peripherally.
* Mostly: Antonyms could be rarely, infrequently, seldom.
* Principally: Antonyms could be secondarily, subsidiarily, incidentally.
The best antonym will depend on the specific context of your sentence.