Manually Uninstall GDAL
Solution 1
I don't know if this will help, but it worked out for me. I was looking to upgrade GDAL, and since I had installed it manually from source, I wanted to uninstall the old version first. So I read somewhere (sorry but I had so many tabs open that I can't find it now) that I should just install the latest package and that would override the previous. And I read another comment saying next time instead of using sudo make install
I should use sudo checkinstall
which creates a deb package wich is uninstallable later running sudo dpkg -r <name_of_your_package>
so I just installed the version I had with sudo checkinstall
(overriding what I had, and creating the package) and then I uninstalled that using sudo dpkg -r gdal
. I know it's not the most elegant thing, but it worked for me.
Solution 2
You need to locate your manually installed binary:
$> which gdalinfo
/usr/local/bin
And then you have to locate other manually installed binaries and remove them (BEWARE BEFORE REMOVING COMMAND: you certainly have other manually installed binaries here)
$> ls /usr/local/bin
gdal-config gdal_contour gdal_grid gdal_rasterize gdal_translate gdaladdo gdalbuildvrt gdaldem gdalenhance gdalinfo gdallocationinfo gdalmanage gdalserver gdalsrsinfo gdaltindex gdaltransform gdalwarp ogr2ogr ogrinfo ogrlineref ogrtindex
When you manually install GDAL, you also install local lib, they should be here: /usr/local/lib/
with the libgdal*
wildcard and inside gdalplugins
. You'll want to remove them also.
Related videos on Youtube
Kyle
Updated on September 18, 2022Comments
-
Kyle almost 2 years
I followed a
./configure
,make
,make install
approach when I originally installed GDAL on my Ubuntu machine, but now I want to upgrade to 1.10.Unfortunately, I want to use apt to perform the upgrade, but after performing an
apt-get install
I rungdal-config --version
I still get a version of 1.9.I've tried manually renaming the .so files in
/usr/local/lib
and/usr/lib
but I still am unable to manually uninstall GDAL.Has anyone else had success doing this?
-
saiarcot895 over 10 yearsDoes
make uninstall
do anything?
-
-
Alexandre Neto almost 9 yearsIt might not be elegant, but it works like a charm!
-
mace almost 8 yearsThis solution worked for me. However, I had trouble with QGIS not loading gdal afterwards due to Python2.7 bindings. I resolved this by removing to folder /usr/local/lib/python2.7/dist-packages/GDAL-1.11.0-py2.7-linux-x86_64.egg