As suggested, I ran sudo /usr/lib/snapd/snap-discard-ns gimp
Then
snap refresh
It started to download and install GIMP. Then gave this error message
error: cannot perform the following tasks:
- Run post-refresh hook of "gimp" snap if present (run hook "post-refresh":
-----
cannot update snap namespace: cannot create symlink in "/etc/gimp": existing file in the way
snap-update-ns failed with code 1: File exists
-----)
If I try to run GIMP, I get this message
ln: failed to create symbolic link '/home/edent/snap/gimp/227/.config/gtk-2.0/gtkfilechooser.ini': File exists
Gtk-Message: 17:17:57.501: Failed to load module "appmenu-gtk-module"
Gtk-Message: 17:17:57.501: Failed to load module "gail"
Gtk-Message: 17:17:57.502: Failed to load module "atk-bridge"
Gtk-Message: 17:17:57.502: Failed to load module "canberra-gtk-module"
/snap/gimp/227/usr/bin/gimp: Gimp-Widgets-WARNING: parse_iso_codes: error parsing '/build/gimp/parts/gimp/install/usr/share/xml/iso-codes/iso_639.xml': No such file or directory