So i was helping a friend of mine install wine so that she could play roblox, and something happened I remote controled her screen. I did sudo apt-get install wine-stable. It said it needed wine64 and when i tried installing it, it said it needed winelib, so i installed it and then tried instaallin wine64. When i did that, the command prompt started uninstalling things. Most her apps were gone. She restarted her computer and ubuntu started in some sort of command prompt mode. I told her to do alt f7 but it did not work. Her computer hen went black. What do i do. Feel free to ask details Note:she had her OS gui on when that happened
1 Answers
Your /var/log/apt/history.log
contains a list of all installed and uninstalled packages. You can use a few commands to make it easier to reinstall the packages without having to type out each package.
First, identify the packages. The following commands will list all the packages that were removed and will also create a file containing the list:
cd
cat /var/log/apt/history.log | grep -A3 "install wine64" | grep "Remove" | tee install-list
Now, we need to clean up the list so run the following command to remove the word "Remove," all the stuff within parentheses, and commas:
sed -e 's/Remove://g;s/([^)]*)//g;s/,//g' install-list
The list should consist of package names that may or may not include the architecture in a format similar to example-packagename:i386 anotherpackage-1-2.3:i386 awesome-packagename:i386
or maybe like this example-packagename:amd64 anotherpackage-1-2.3:amd64 awesome-packagename:amd64
If this list of uninstalled packages looks correct, run the following command to apply the changes (use the up arrow key to get to the last command and simply change sed -e
to sed -i
so you don't have to type it all over again:
sed -i 's/Remove://g;s/([^)]*)//g;s/,//g' install-list
Now to install the packages, run the following command but this time review the output before you accept the changes (it should list some packages to uninstall like amd64 packages and all the wine stuff):
sudo apt update
sudo apt install $(cat ./install-list)
Please post any errors.

- 43,546
- 8
- 97
- 150
-
I'm not exactly sure why this happened in the first place but if you try installing
wine64
again, do not usesudo apt install -y
and useapt install wine64
instead so you can review the changes before you accept. Then, you can go through the list and determine the problem or ask a question about it here to help figure out a solution for installation. – mchid Jul 25 '20 at 22:14
ligtdm
it should still be on CTRL+ALT+F7 – mchid Jul 25 '20 at 22:17