Auto installed Wine ubuntu 20.04

I recently upgraded to ubuntu 20.04 after using 18.04 for 3 years, and i was playing around with the new snap Ubuntu Software, and saw there is Trackmania listed in games so i installed it.

But when i tried to open it it showed me wine is being setup in home folder, i dont want wine to be installed in my current setup so i removed Trackmania, and checked if wine is installed with

dpkg -l | grep ^ii | grep -i wine

But wine is not present, then i searched for wine prefixes

du -sh ~/.wine/*

nothing there, but as i know from experience if wine is installed it doesn't go away that easily, so since Ubuntu Software is totally a snap app now, i checked if some snap is installed which is related to wine (i never knew wine can be as a snap).

shantanu@shantanu-pc:~$ ls /var/lib/snapd/snaps
bare_5.snap                   partial
beekeeper-studio_113.snap     pyqt5-runtime_12.snap
canonical-livepatch_105.snap  snapd_13170.snap
core_11743.snap               snapd_13270.snap
core_11798.snap               snap-store_547.snap
core18_2128.snap              wine-platform-3-stable_14.snap
gnome-3-28-1804_161.snap      wine-platform-runtime_251.snap
gnome-3-34-1804_72.snap       youtube-dl_4572.snap
gtk-common-themes_1515.snap   youtube-dl-pro_49.snap
gtk-common-themes_1519.snap

and lo and behold there it is, but what is it exactly this wine-platform-3-stable_14.snap and wine-platform-runtime_251.snap ? these are for sure not full flegged wine, so what are they and what do they do.

Can i remove them without breaking the system ? I mean i am not much familiar with snap ecosystem, and not sure if these two wine runtimes came with fresh ubuntu install.

Thanks for reading.


Let's see....

$ snap info wine-platform-3-stable

description: |
  This snap creates a WINE stable 3 via content sharing to be used by other
  snaps that are using WINE.

$ snap info wine-platform-runtime

description: |
  This snap provides a WINE runtime liberies via content sharing to be used
  by other snaps that are using WINE.

"...[I] know from experience if wine is installed it doesn't go away that easily"

Your experience has perhaps misled you a bit. The persistence of Wine files depends upon your install method. Simple command to snapd will remove all Wine-related files:

sudo snap remove wine-platform-3-stable
sudo snap remove wine-platform-runtime

Snaps are containerized versions of software that come bundled with their own dependencies.

Your concerns about this snap installing WINE on your system are not quite accurate. These dependencies included in the snap don't interfere with the other software installed on your system.

The WINE platform snaps provide libraries for other snaps that need to use WINE. You can check out the description for these on snapcraft: wine-platform-runtime and wine-platform-3-stable

Further reading:

  • What is the Snap packaging format?
  • Why do snap-packages exist...?
  • Why would I want to install a snap if I can install via apt instead?