I changed some files and cannot use GUI in ubuntu 20.04

I was trying to restore previous versions of the files and this is what I did from root: cp -r /snap/gnome-3-34-1804/66/usr/lib/x86_64-linux-gnu /usr/lib

From that moment I cannot use the GUI. I can only login to the computer through the terminal (for example tty2). Please is there any way to repair the GUI?


To reinstall the libraries in /usr/lib you have to connect the problematic machine to network and then execute below commands from text TTY:

sudo apt-get update
sudo apt-get install --reinstall $(dpkg -S /usr/lib/ | sed 's/,//g' | sed 's|: /usr/lib||')

and

cd /snap/gnome-3-34-1804/66/usr/lib/x86_64-linux-gnu
sudo apt-get install --reinstall $(dpkg -S $(ls -1 *.so*) | awk -F: '{print $1}' | sort -u)