Install GDAL from sources

Uninstall ‘libgdal-dev’ if installed:

sudo apt-get remove libgdal-dev

Download and extract the gdal source code:

tar -xvzf gdal-2.2.4.tar.gz
cd gdal-2.2.4

Configure and compile:

./configure --prefix=/usr 

Build and install the Debian package:

sudo apt-get install checkinstall
sudo checkinstall

This will build a debian package that can then be normally installed and removed using the package manager.