I ran a command:
sudo apt-get remove libstdc++6
I know, I shouldn't have! .. but now nothing works, not even
apt-get, it's not there anymore.
How do I reverse this?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
There is no easy rollback feature, but you can reinstall the packages required to get
apt up and running again, and proceed from there:
wget http://launchpadlibrarian.net/336920453/libstdc++6_5.4.0-6ubuntu1~16.04.5_amd64.deb sudo dpkg -i libstdc++6_5.4.0-6ubuntu1~16.04.5_amd64.deb
libstdc++6 (for Ubuntu 16.04, assuming you’re running
wget http://launchpadlibrarian.net/339152322/apt_1.2.25_amd64.deb http://launchpadlibrarian.net/339152325/libapt-pkg5.0_1.2.25_amd64.deb sudo dpkg -i apt_1.2.25_amd64.deb libapt-pkg5.0_1.2.25_amd64.deb
At this point you can look at the logs in
/var/log/apt to see what the removal of
libstdc++6 took with it, and reinstall those packages using