Removing remote management requires erasing the MacOS installation and unsetting the external Mobile Device Management profile (MDM) during a fresh installation. The computer is temporarily disconnected from the internet to prevent reinstall of the MDM profile.

Permission to boot from external disk is disabled by default in recent MacOS (since ~2020). To enable install from bootable USB, this setting must be enabled from recovery mode before the operating system is deleted (while the user exists with admin permissions).

Procedure

Download MacOS

Burn MacOS onto a bootable USB drive

Allow boot from external media

Erase existing MacOS


Install MacOS using Recovery Installer

or

Install MacOS from bootable external media


Disable Remote Management

References