With older versions of ubuntu this questions answers still worked. Now they don't.
The repositories aren't reachable and building from source fails because of dependency errors.
I've found this PPA, but it isn't working either:
The following packages have unmet dependencies: libgegl-0.0-0 : Depends: libpng12-0 (>= 1.2.13-4) which is a virtual package and is not provided by any available package
How do you go back to the last sane version of gimp: 2.6?
Add Malcolm Scott's repository using:
gimp depends on libpng12-0 which is not available in official repository of Bionic. You can download it from Xenial packages download page or direct download. Install it using;
Now install gimp using