I was trying to install winehq-stable and it gave me an error that it needed some dependencies. The first one I tried to install (libglib2.0-0:i386) removed most of my stuff (well over 100 packages - everything from Skype to x-windows I think)

Now when I do an apt-get upgrade it lists a ton of packages that "are no longer needed"

Most of the system is no longer available (e.g. Applications menu, top bar with date/time, right top icons (network, logout, messages, etc.) and the bottom toolbar also looks totally different.

I haven't rebooted it yet because I'm not sure what will happen if I do. Is there any way to recover?

  • Hi Aaron, welcome to eOS SE. Your participation is much appreciated. I have made some changes on your post to make it look better though your choice of words DO describe your problem well.
    – Hasan
    Jan 7, 2019 at 20:34

2 Answers 2


Thanks All. I tried the suggested fix, but it didn't work. I did find something that seemed to fix what had happened. I used these commands to create a file with all of the packages that had been deleted. Then I ran the file to reinstall them.

echo '#!/bin/bash' > restore
echo sudo apt-get install `grep Remove /var/log/apt/history.log | tail -1 | sed -e 's|Remove: ||g' -e 's|([^)]*)||g' -e 's|:[^ ]* ||g' -e 's|,||g'` >> restore
chmod +x restore 

I got it here: https://askubuntu.com/questions/738984/how-to-undo-apt-get-autoremove

  • Good to know. Please mark your answer as answers.
    – Hasan
    Jan 8, 2019 at 9:53

First of all, try to login with live CD and your data in an external drive. Just in case, if this method didn’t work, you can still have your data and reinstall everything!

At the login screen, press CTRL+ALT+F1 to switch to tty1.

Now, type the following commands one by one,

sudo rm /var/lib/apt/lists/lock

sudo rm /var/lib/dpkg/lock

sudo rm /var/lib/dpkg/lock-frontend

sudo dpkg --configure -a

sudo apt clean

sudo apt update --fix-missing

sudo apt install -f

sudo dpkg --configure -a

sudo apt upgrade

sudo apt dist-upgrade

Finally, reboot the using,

sudo reboot

Above instructions are grabbed from here, https://www.ostechnix.com/how-to-fix-broken-ubuntu-os-without-reinstalling-it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.