Restore default packages
Solution 1:
Without a terminal of some form, it could just be one you get by switching to a tty (e.g. pressing Ctrl+Alt+F6) and a network connection you will struggle.
If you have access to these two things you should type
sudo apt-get install ubuntu-desktop
to reinstall all the packages installed by default.