Since SCSM 2012 SP1, any component of SMSM self-service portal can’t be located on management server (technically, this will work, but not supported any more). But if you using SCSM since 2010 or 2012, you can have SMPortal installed on management server. In this case you need to remove SMPortal.
The only-supported way is to uninstall management server together with self-service portal and reinstall management server. This is dangerous operation (you just need to save all your custom assemblies from SCSM directory and install management server, target installation to same database). But sometime, especially in lab environment, you need to remove self-service with some “fast” way. This article describe how to do this, but please keep in mind: this is unsupported.
To remove portal you can simple remove Sharepoint and remove all IIS sites. But if you try to update management server after this, you will get “Microsoft System Center 2012 Service Manager is not in a valid state.”. This is because installer “know” that SMPortal was installed before. To clean-up this, you must change registry. Please open the key: HKEY_CLASSES_ROOT\Installer\Features\5BA67A970AE3F4C4989BC10A4083CEE2 and remove next values:
After this you can safely update your management server.
UPDATE: If you will try to update your installation to SM2016, you may got error “In place upgrade to Service Manager 2016 along with Self Service Portal requires additional steps.”. To resolve this issue, just remove key: