It seems to me that the real issue is that &quot;rm -rf&quot; should by default not recurse into mounted filesystems, but should at most try to unmount them.<p>In addition to clearing EFI variables, the current behavior will also attempt to clear any mounted removable drives and any mounted network drives, which is usually even more harmful than messing with EFI.<p>Of course that would be a backwards incompatible change, although I don&#x27;t think many scripts rely on this behavior.