I'm trying to upgrade QGIS to the latest (3.0.3) under Lubuntu 18.04 LTS. However, the apt-get upgrade stopped working:

$sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  libqgis-customwidgets python-qgis python-qgis-common qgis qgis-common
  qgis-plugin-grass qgis-plugin-grass-common qgis-provider-grass
  qgis-providers qgis-providers-common
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.

I checked that nothing is kept back with sudo apt-mark showhold.

However, the install command:

sudo apt-get install qgis

seems upgrade qgis to the latest version without an issue. The entry in /etc/apt/sources.list is:

deb https://qgis.org/debian bionic main

Any idea what could be preventing the upgrade from working? (And is it safe to force the upgrade with install?)

  • have you done sudo apt-get update first?
    – Spacedman
    May 21, 2018 at 14:18
  • Then try sudo apt-get --with-new-pkgs upgrade - this happens if the packages to upgrade require packages that you don't have yet. unix.stackexchange.com/questions/38837/…
    – Spacedman
    May 21, 2018 at 14:22
  • I think the issue is this: 3.0 and above only available with ubuntugis (plain xenial lacks GDAL2) - meaning you'll have to hook up to the ubuntugis repository to get v3.0 on your version of Ubuntu... May 21, 2018 at 15:17
  • @Spacedman Yes, I did sudo apt-ge update first. After that, upgrade didn't work but install worked.
    – tinlyx
    May 21, 2018 at 16:19

1 Answer 1


The short is the repository has change/moved/added a dependency. You current installation of qgis has a package it needs to install new but it isn't going to install it as a part of the upgrade, so puts a 'soft hold' on qgis. This way Debian will leave you with a out of date but working qgis installation.

If you reinstall qgis, as you pointed out, it will succeed.


The best-practice is to install not dist-upgrade, this could mess up your system depending on its current state.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.