Can I delete the InstallESD.dmg file?
This problem happens, when I download MacOS installer and do not need it anymore (e.g. when it is used to create USB Installer only). With enabled firmware password, this file is simply unremovable.
Other questions mentioned solution with disabling csrutil, but this is both complicated and dangerous (you might forget to switch it back).
For me it was sufficient to move the file from Trash to /tmp/ and reboot.
Earlier Mac models