This question already has an answer here:
So this seems simple, but I've been googling for days.
An install of gitlab went wrong, so I tried to purge it to reinstall, however I get this:
dpkg: error processing package gitlab-ce (--remove): package is in a very bad inconsistent state; you should reinstall it before attempting a removal
However trying to install it causes it to hang at 6%, the problem it had initially. I'm no longer needing gitlab at all (I'm using gitea on a different machine), but this problem is preventing me from installing anything at any time I use apt to install something it also wants to install gitlab at the same time, which again hangs at 6%.
sudo apt-get install curl shows this:
Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: gitlab-ce libcurl4 The following packages will be upgraded: curl gitlab-ce libcurl4 3 upgraded, 0 newly installed, 0 to remove and 65 not upgraded. 1 not fully installed or removed. Need to get 472 MB of archives. After this operation, 1460 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 curl amd64 7.58.0-2ubuntu3.5 [159 kB] Get:2 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libcurl4 amd64 7.58.0-2ubuntu3.5 [214 kB] Get:3 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu bionic/main amd64 gitlab-ce amd64 11.5.0-ce.0 [472 MB] Fetched 287 MB in 18s (16.3 MB/s) (Reading database ... 54181 files and directories currently installed.) Preparing to unpack .../gitlab-ce_11.5.0-ce.0_amd64.deb ...