0

I am trying to uninstall wine using Ubuntu Software store but it keeps saying "Unable to remove Wine: no packages to remove"

Edit: Commands:

swastik@Swas-PC-Ubuntu:~$ sudo apt install winehq-stable
[sudo] password for swastik: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies: winehq-stable : Depends: wine-stable (= 7.0.0.0~hirsute-1) E: Unable to correct problems, you have held broken packages. swastik@Swas-PC-Ubuntu:~$ sudo apt install wine-stable Reading package lists... Done Building dependency tree
Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: wine-stable : Depends: libc6 (>= 2.33) but 2.31-0ubuntu9.7 is to be installed Depends: wine-stable-i386 (= 7.0.0.0~hirsute-1) Depends: wine-stable-amd64 (= 7.0.0.0~hirsute-1) but it is not going to be installed E: Unable to correct problems, you have held broken packages. swastik@Swas-PC-Ubuntu:~$ sudo apt install libc6 Reading package lists... Done Building dependency tree
Reading state information... Done libc6 is already the newest version (2.31-0ubuntu9.7). The following package was automatically installed and is no longer required: libfwupdplugin1 Use 'sudo apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. swastik@Swas-PC-Ubuntu:~$ sudo apt install wine-stable-i386 Reading package lists... Done Building dependency tree
Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: wine-stable-i386:i386 : Depends: libc6:i386 (>= 2.33) but 2.31-0ubuntu9.7 is to be installed Recommends: libcups2:i386 but it is not going to be installed Recommends: libglu1-mesa:i386 but it is not going to be installed or libglu1:i386 Recommends: libodbc1:i386 but it is not going to be installed Recommends: libosmesa6:i386 but it is not going to be installed Recommends: libsdl2-2.0-0:i386 but it is not going to be installed Recommends: libv4l-0:i386 but it is not going to be installed Recommends: libxcomposite1:i386 but it is not going to be installed Recommends: libxcursor1:i386 but it is not going to be installed Recommends: libxfixes3:i386 but it is not going to be installed Recommends: libxi6:i386 but it is not going to be installed Recommends: libxinerama1:i386 but it is not going to be installed Recommends: libxrandr2:i386 but it is not going to be installed Recommends: libxrender1:i386 but it is not going to be installed Recommends: libxxf86vm1:i386 but it is not going to be installed E: Unable to correct problems, you have held broken packages. swastik@Swas-PC-Ubuntu:~$ sudo apt install wine-stable-amd64 Reading package lists... Done Building dependency tree
Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:

The following packages have unmet dependencies: wine-stable-amd64 : Depends: libc6 (>= 2.33) but 2.31-0ubuntu9.7 is to be installed Recommends: libodbc1 but it is not going to be installed Recommends: libosmesa6 but it is not going to be installed Recommends: libsdl2-2.0-0 but it is not going to be installed E: Unable to correct problems, you have held broken packages. swastik@Swas-PC-Ubuntu:~$

SwasGamma
  • 1
  • 1
  • 6

1 Answers1

0

Use the following command to search for installed packages that contain the word "wine":

dpkg -l | grep wine

To be more accurate, you can search for packages that begin with the word wine:

dpkg -l | grep "ii  wine"

To uninstall a package, you can use the apt purge command. For example, if you want to uninstall the package wine64, use the following command:

sudo apt purge wine64

Finally, to delete your wine prefix, run the following commands:

cd
rm -r .wine

or

cd
rm -r .wine*
mchid
  • 43,546
  • 8
  • 97
  • 150
  • Its saying wine is not installed " swastik@Swas-PC-Ubuntu:~$ dpkg -l | grep wine swastik@Swas-PC-Ubuntu:~$ dpkg -l | grep "ii wine" swastik@Swas-PC-Ubuntu:~$ sudo apt purge wine64 [sudo] password for swastik: Reading package lists... Done Building dependency tree
    Reading state information... Done Package 'wine64' is not installed, so not removed The following package was automatically installed and is no longer required: libfwupdplugin1 Use 'sudo apt autoremove' to remove it. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded."
    – SwasGamma Mar 25 '22 at 15:16
  • rm: cannot remove '/home/swastik/.wine': No such file or directory – SwasGamma Mar 25 '22 at 15:29
  • @GammaSpeed wine64 was an example. If wine packages are installed, they will be listed when you run the dpkg command. If no packages are listed, it is not installed. However, if a package is listed, then you will run the command to remove whatever package is listed. For example, if ii wine is listed, then you would run sudo apt purge wine If ii wine-stable is listed, you would run sudo apt purge wine-stable etc. . . – mchid Mar 25 '22 at 15:29
  • @GammaSpeed Okay good, it looks like it is not installed. – mchid Mar 25 '22 at 15:30
  • 1
    When Wine was downloading (from Ubuntu Software store), I had to cancel it due to some network issues. After this Software store was showing that Wine is downloaded but I couldn't find it in App Grid, so I decided to remove it but it displayed "Unable to remove wine: no packages to remove" – SwasGamma Mar 25 '22 at 15:37
  • @GammaSpeed Okay, well it may have downloaded but it appears it did not install. If you want to install it, have you already tried to reinstall the package? – mchid Mar 25 '22 at 15:38
  • I tried to reinstall it but first I have to remove it but its not removing. – SwasGamma Mar 25 '22 at 15:45
  • I tried downloading wine from commands but it was showing dependencies errors. I tried installing them but each of them showed more dependencies errors. – SwasGamma Mar 25 '22 at 15:47
  • Please post the dependency errors in your question. Copy and paste the entire output. Thanks. – mchid Mar 25 '22 at 16:00
  • Posted the dependencies errors – SwasGamma Mar 25 '22 at 16:08