How to uninstall Magisk
The simplest way to remove Magisk is Uninstall Magisk → Complete Uninstall in the Magisk app. This page covers every other situation too: no app, a phone that won't boot, Samsung, and relocking the bootloader without bricking the phone.
Last updated 9 sourcesHow we check pages
Pick your situation
Which way to uninstall?
- YesFlash the complete stock firmware in Download mode. Never restore single partitions
- NoDoes the phone boot into Android?
- YesDoes the Magisk app show an installed version?
- YesComplete Uninstall in the app (reinstall the app first if it's gone)
- No (N/A)Flash the stock image with fastboot
- Yes
- NoDid it stop booting after a module?
- YesRemove modules first (Safe Mode or
adb), then Complete Uninstall - NoFlash the stock image with fastboot
- Yes
- Yes
Uninstall from the Magisk app (recommended)
- Open the Magisk app. If you hid it (possible up to v30.7), it appears under the name you gave it, "Settings" by default.
- Tap Uninstall Magisk in the Magisk card. The dialog warns: "All modules will be disabled/removed! Root will be removed!"
- Tap Complete Uninstall. Don't pick Restore Images: that only puts the stock image back for a system update and leaves Magisk's files in place.
- The app removes Magisk, uninstalls itself and the phone reboots a few seconds later.
Magisk's documentation calls this the easiest way to uninstall. If the Magisk app is gone, install it again from the download page first. Since v31.1, Magisk no longer reinstalls its app automatically when it is missing.
What Complete Uninstall does
From Magisk's uninstaller script:
- Restores the stock
bootorinit_bootimage (anddtb/dtboif they were patched) from the backup in/data/magisk_backup_*. If there is no backup, it rebuilds the stock ramdisk from the copy Magisk keeps inside the patched image. - Runs each module's
uninstall.sh, then deletes all modules. Some modules only undo changes made outside their own folder this way, such as Universal GMS Doze. - Deletes Magisk's files from
/data/adb,/cache,/metadataand/persist. - Refuses to touch an image patched by another root tool ("Boot image patched by unsupported programs").
What restoring puts back: our check
When there's no saved stock image, Magisk rebuilds it from the backup it keeps inside the patched image. We tested that step on a real file: Google's generic boot image, patched by Magisk v31.1's own script, then restored with magiskboot cpio restore, the command the uninstaller uses. Android's original init came back byte for byte, Magisk's added files were removed, Magisk's status check returned 0 (stock) again, and the kernel had never been changed.
Lines 62 to 84 of the unedited output. Full log · how it was made
This was a test of the image file on a computer, not an uninstall on a phone. How the image was patched: what patching actually changes.
Uninstall by flashing the stock image
Use this when the app can't do it: the app shows Not Installed (v31.1) or Installed: N/A (v30.7), or the phone won't boot. Flash the unmodified image from the firmware of the build you are running, to the partition you patched:
This removes root, but leaves Magisk's data and modules in /data/adb. Without Magisk running, nothing there is loaded; the files stay until a factory reset. Module uninstall.sh scripts don't run. Where to get the stock image: getting the stock image.
With a custom recovery, Magisk's guide also lets you rename the Magisk APK to uninstall.zip and flash it. Run from recovery, the script can't uninstall the app: remove it yourself after rebooting.
If the phone won't boot
A bootloop after installing a module is usually fixable without uninstalling. Magisk's FAQ gives two routes:
- With USB debugging on: run
adb shell magisk --remove-moduleswhile the phone is starting. It removes all modules and reboots. - Without it: use Magisk's Safe Mode, which disables all modules. Press Volume Down a few seconds before the boot animation and let go as soon as it appears. Magisk's v31.1 FAQ also says it enters Safe Mode by itself after the phone fails to finish booting twice in a row.
Then uninstall from the app if you still want to. If Magisk itself stops the phone booting, flash the stock image as above. Full recovery steps: fixing a Magisk bootloop.
Samsung phones
Magisk's guide warns never to restore boot, init_boot, recovery or vbmeta to stock on their own: "You can brick your device by doing so, and the only way to recover from this is to do a full firmware restore with data wipe." To remove Magisk from a Galaxy, flash the complete stock firmware (BL, AP, CP and CSC, which wipes data) for your model in Download mode. The Knox warranty bit stays tripped. Tools and firmware: Samsung guide.
Relocking the bootloader
A locked bootloader checks every boot partition against the manufacturer's keys. If anything modified is still installed when you lock (a Magisk-patched image, a custom ROM, kernel or recovery, a vbmeta flashed with verification disabled), AOSP's boot flow rules say the phone shows a red error screen and can't continue booting. To unlock again you need the OEM unlocking setting, which is inside Android: a phone that can't boot may not be recoverable.
Relocking without bricking the phone
- 1Back upLocking resets the phone
- 2Flash full stock firmwareEvery partition, same build
- 3Boot onceCheck it starts normally
- 4Lock
fastboot flashing lock - 5Only then turn OEM unlocking offOptional
- Back up. AOSP says locking resets the device.
- Flash the complete stock firmware for your model, not just the image you patched: every partition you or a tool may have changed, including
vbmeta. Each brand's full firmware and flashing steps are in the device guides. - Boot it once and check Android starts normally, with Magisk gone.
- Lock from the bootloader with
fastboot flashing lockand confirm on the phone. Samsung and some other brands use their own process; follow your manufacturer's instructions. - Leave OEM unlocking on until the locked phone has booted. Turning it off is optional afterwards.
After relocking on stock firmware, the unlocked-bootloader warning at boot goes away, and Play Integrity's DEVICE verdict can pass again.
Questions people ask
Does uninstalling Magisk delete my data?
Complete Uninstall removes Magisk's own files and modules, not your apps, photos or settings. The app warns that "Any internal storage unencrypted through the use of Magisk will be re-encrypted". Relocking the bootloader afterwards is different: it resets the phone.
Is the bootloader locked again after uninstalling?
No. Uninstalling only removes Magisk. The bootloader stays unlocked until you lock it yourself, and the phone keeps showing its unlocked-bootloader warning at boot.
Will banking apps and Google Wallet work after uninstalling?
Not necessarily. On Android 13 and newer, Play Integrity's DEVICE and STRONG verdicts need a locked bootloader, so an unrooted phone with an unlocked bootloader still fails them. Relocking on stock firmware is what restores them. See Play Integrity and root.
Will I get system updates again?
Yes, once every partition is stock again. Complete Uninstall restores the stock image the app backed up, or rebuilds it from the backup stored inside the patched image.
Does uninstalling undo Samsung's Knox warranty bit?
No. Magisk's guide says installing Magisk trips the Knox warranty bit and that this "is not reversible in any way". Uninstalling or relocking does not change it.
I only want to remove the app, not Magisk
On v31.1 you can uninstall the app like any other and Magisk keeps running; the release notes even suggest it once root access and modules are set up. Install the APK again when you need it. Don't use Complete Uninstall for this.
Sources
This page is written from the sources below. If anything here disagrees with them, the upstream source is correct.
- Magisk installation guide (topjohnwu)
- Magisk FAQ (topjohnwu)
- Magisk changelog (topjohnwu)
- uninstaller.sh: what Complete Uninstall does (Magisk source)
- module.rs: remove_modules runs each uninstall.sh (Magisk source)
- app_functions.sh: Ramdisk and A/B detection, restore_imgs (Magisk source)
- Magisk app strings: menu and button names (Magisk source)
- Lock and unlock the bootloader (Android Open Source Project)
- Boot flow and boot states for locked and unlocked devices (Android Open Source Project)
Found a mistake or something out of date? Tell us and we will check it against the source and fix the page. Confirmed corrections are listed in the corrections log.
Report a problem with this page