csrutil disable
Restart computer
In the terminal, type
sudo open /Applications/TextEdit.app /System/Library/LaunchDaemons/com.apple.ManagedClient.enroll.plist
change
<key>com.apple.ManagedClient.enroll</key>
<true/>
to
<key>com.apple.ManagedClient.enroll</key>
<false/>
So that the changes take effect
From my knowledge you shouldn't have to do a clean install via pendrive. Thats what you do if the profile has been installed and mdm is active on your laptop as you shouldnt even be able to login normally without an admin password setup by the company/school that the remote management has been installed by.
Those steps you listed doing a clean install with the internet being off from my knowledge arent needed since this is just the notification we are dealing with not actually removing the mdm profiles that are most likely unremovable as listed in this link (https://graffino.com/til/UmkCdmEx7v-remove-a-non-removable-mdm-profile-from-macos-without-a-complete-wipe).
@ibgroovy yeah its not that weird as apple is now pinging certain webhosts/servers to check if your device is regiustered as a mdm device that is why you are getting the notifcation popup. It looks like they added it in Sonoma. Per what @sonomadep said
"Apple further added a new gate preventing people from using their DEP-enabled Macs without installing the profiles in macOS Sonoma. After upgrading from a fully-working Ventura copy (with MDM servers blocked in hosts) to macOS Sonoma DP 1, your Mac will want to give you a pop-up window every 10 mins reminding you to install a DEP profile. Did some experiments and I think Apple is secretly pinging their MDM servers no matter you have an active profile associated w/ SN or not. As long as the servers are not reachable they will annoy you with their new pop-up system."
I relooked through the forum and didnt see anyone mentioning it not a safe method due to reasons with firevault or whatever. And Im not following what you're saying about undoing skipmdm. Skipmdm is the same thing as the other steps listed its just an automated script that does it for you and is able to do it from recovery mode instead of logging in. I havent taken the time to understand the script to be able to explain it in depth but the steps we have outlined just in an automated fashion. i just did both methods via skipmdm and the regular way as being extra precautious. You should be fine as far as your concerns with firevault go. I dont see why that would be of concern, i think the skipmdm script was written kinda poorly from what i read because it auto assumes your drive is called Macintosh HD which for some users that might not be the case. Thats what you might be referencing and why some users were doing the clean wipe method even though they didnt have to, all they needed to do was change the skipmdm script and change the drive name from Macintosh HD to whatever their drive name is.
Again man not to trying to be an ass but I really think you should try to sit here for like 30 mins to an hour and understand the commands that you are doing so you know what you're doing to your computer. Its never a good idea to just follow along as Im sure you will be fine but understanding what you're doing and why you're doing it and what all it will impact is super important.
I was being a dummy earlier and @TomRider22 shared this link https://support.apple.com/en-ke/HT210060 which helps breakdown what each we port that we were told to block does and how it will impact your local environment.
#block mdm connect
0.0.0.0 iprofiles.apple.com
0.0.0.0 mdmenrollment.apple.com
0.0.0.0 deviceenrollment.apple.com
0.0.0.0 gdmf.apple.com
0.0.0.0 acmdm.apple.com
0.0.0.0 albert.apple.com
I also asked chatgpt for extended explanations, but anyways yeah fully wiping your laptop and doing a clean install doesnt seem to be necessary from my knowledge for removing the notification popups. Its only needed to remove "non-removable" mdm profiles from your machine and that would mean you cannot login normally because you need admin access that is being controlled by a company/school/etc.