1

I'm using ubuntu 18.04. I had installed wine and playonlinux using following commands:

sudo dpkg --add-architecture i386
wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'
sudo apt update
sudo apt install --install-recommends winehq-stable

wget -q "http://deb.playonlinux.com/public.gpg" -O- | sudo apt-key add -
sudo wget http://deb.playonlinux.com/playonlinux_bionic.list -O /etc/apt/sources.list.d/playonlinux.list
sudo apt update
sudo apt install playonlinux

Now for some reason I had to uninstall wine and playonlinux. To do so I run following commands:

sudo apt remove --purge wine*
sudo apt autoremove wine-*

Then I removed the key from /etc/apt/sources.list.

I thought this was enough to remove wine and playonlinux. But when I run apt list wine* I got following output:

wine/xenial 1:1.6.2-0ubuntu14 amd64
wine-binfmt/bionic,bionic 3.0-1ubuntu1 all
wine-development/bionic,bionic 3.6-1 all
wine-stable/bionic,bionic 3.0-1ubuntu1 all
wine1.4/xenial 1:1.6.2-0ubuntu14 amd64
wine1.4-amd64/xenial 1:1.6.2-0ubuntu14 amd64
wine1.4-dbg/xenial 1:1.6.2-0ubuntu14 amd64
wine1.4-dev/xenial 1:1.6.2-0ubuntu14 amd64
wine1.4-i386/xenial 1:1.6.2-0ubuntu14 i386
wine1.6/bionic 1:1.8.4ubuntu1 amd64
wine1.6-amd64/bionic 1:1.8.4ubuntu1 amd64
wine1.6-dbg/xenial 1:1.6.2-0ubuntu14 amd64
wine1.6-dev/bionic 1:1.8.4ubuntu1 amd64
wine1.6-i386/bionic 1:1.8.4ubuntu1 i386
wine32/bionic 3.0-1ubuntu1 i386
wine32-development/bionic 3.6-1 i386
wine32-development-preloader/bionic 3.6-1 i386
wine32-development-tools/bionic 3.6-1 i386
wine32-preloader/bionic 3.0-1ubuntu1 i386
wine32-tools/bionic 3.0-1ubuntu1 i386
wine64/bionic 3.0-1ubuntu1 amd64
wine64-development/bionic 3.6-1 amd64
wine64-development-preloader/bionic 3.6-1 amd64
wine64-development-tools/bionic 3.6-1 amd64
wine64-preloader/bionic 3.0-1ubuntu1 amd64
wine64-tools/bionic 3.0-1ubuntu1 amd64
winefish/bionic,xenial 1.3.3-0dl1ubuntu2 amd64
winetricks/bionic,bionic 0.0+20180217-1 all

How could I get rid of those packages?

N0rbert
  • 99,918

3 Answers3

3

apt list isn't doing what you think it does in this context. According to my man page as well as the output of apt list itself, apt list is a work in progress with an unstable CLI interface. apt list --installed will show you the installed packages. It looks like apt list is providing a list of available packages.

Elder Geek
  • 36,023
  • 25
  • 98
  • 183
1

I would recommend to remove Wine with programmatic way like:

sudo apt-get purge $(dpkg -l | grep -i wine | awk '{print $2}')

followed by

sudo apt-get autoremove --purge

Also please note that apt list does not list installed packages by default, but has options for doing so - see man apt locally or online:

list (work-in-progress)
list is somewhat similar to dpkg-query --list in that it can display a list of packages satisfying certain criteria. It supports glob(7) patterns for matching package names as well as options to list installed --installed), upgradeable (--upgradeable) or all available (--all-versions) versions.

so you need to specify --installed explicitly option with command like:

apt list wine* --installed

to get correct output.

N0rbert
  • 99,918
0

Enter the following commands verbatim in terminal:

cd $HOME
rm -r .wine
rm .config/menus/applications-merged/wine*
rm -r .local/share/applications/wine
rm .local/share/desktop-directories/wine*
rm .local/share/icons/????_*.xpm

Be careful that you are typing the write paths or you could delete important files. If you get permissions issues put sudo in front of each command

After deleting the files run command:

sudo apt-get remove --purge wine

Do the following to correct any errors:

sudo apt-get update
sudo apt-get autoclean
sudo apt-get clean
sudo apt-get autoremove
ldias
  • 2,055