I gave my account to a friend to activate it as his primary account on his console and now I need to put it back as my primary but he's out of the country atm , is there anyway I can deactivate it from his ps4 through my ps4??
Since there can only be one primary PS4 console, all you have to do is set yours as the primary.
From the PlayStation website:
Quote
After you have signed into your PSN Account: Select [PSN] > [Activate as Your Primary PS4] > [Activate].
See the PS Knowledge Center for more: https://support.us.playstation.com/app/answers/detail/a_id/5059/~/activate-%2F-deactivate-primary-ps4