The visual desktop environment you see when you use Ubuntu Linux is called GNOME. It manages your top panel, your application launcher, and all the windows on your screen. If you install a buggy extension, forcefully remove a critical system library, or experience a failed OS upgrade, the GNOME environment can become catastrophically corrupted.
When this happens, you might boot your computer only to be greeted by a completely black screen, a flashing cursor, or a desktop where you cannot click anything. Because the graphical interface is broken, you cannot use standard tools to fix it. Instead, you must drop down to a raw text terminal and force the package manager to completely reinstall the entire GNOME desktop environment from scratch.
How to Completely Reinstall the Ubuntu GNOME Desktop
You must use the TTY terminal to execute the reinstallation commands.
- If your graphical desktop is frozen or black, press Ctrl + Alt + F3 on your keyboard. This will instantly drop you into a raw, black text terminal (TTY3).
- Type your Ubuntu username and press Enter. Then type your password (the characters will be invisible) and press Enter.
- First, you must instruct the package manager to cleanly remove the corrupted GNOME desktop packages. Type the following command and press Enter:
sudo apt-get remove --purge ubuntu-desktop gnome-shell - Next, run the autoremove command to delete any leftover, broken graphical dependencies:
sudo apt-get autoremove - Finally, you must command the system to download and install a completely fresh, uncorrupted copy of the entire graphical environment. Type this command and press Enter:
sudo apt-get install ubuntu-desktop gnome-shell
This final command will take several minutes to download hundreds of megabytes of packages. Once the prompt returns, type sudo reboot and press Enter. Your Ubuntu machine will restart and boot directly into a perfectly functioning, factory-fresh GNOME desktop environment.