Removing the Top bar in Ubuntu Desktop
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval string:'Main.panel.hide();'
above command hides the bar so that if you need to call back, you can do so with below command
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval string:'Main.panel.show();'
You can destroy the panel such that you cant call back,
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval string:'Main.panel.destroy();'
All the above commands will revert back once you relogin. To make any of the command to be persistent, need to add the command you required in startup command list.