If you're in Twine 1, put this in a script passage.
$('#ui-bar').remove(); $(document.head).find('#style-ui-bar').remove();
If you're using an older version of SugarCube (<v2.17.0), then litrouke's answer is appropriate. Starting with SugarCube v2.17.0, however, the correct way to remove the UI bar, as noted in its documentation, is the following:
UIBar.destroy();
Honestly, reading SugarCube's official documentation does actually help in most cases.