I am using Ubuntu 18.04 and I tried to upgrade libc6 from version 2.27 to 2.29 but I ended up breaking package system. I cannot fix because when I try to use fix commands, it always shows tons of package in system will be REMOVED.

Synaptic shows these packages as broken:

  • glibc-doc 2.27-3
  • libc-dev-bin 2.27-3
  • libc6 2.29-0
  • libc6-dbg 2.27-3
  • libc6-dev 2.27-3
  • libc6:i386 2.27-3

How I broke? I downloaded following packages from https://packages.ubuntu.com/

  • glibc-doc_2.29-0ubuntu2_all.deb
  • glibc-source_2.29-0ubuntu2_all.deb
  • libc6_2.29-0ubuntu2_amd64.deb
  • libc6-amd64_2.29-0ubuntu2_i386.deb
  • libc-bin_2.29-0ubuntu2_amd64.deb
  • locales_2.29-0ubuntu2_all.deb

I tried to install them via dpkg one by one but didn't work because of dependency errors, and lastly I used this command:

sudo dpkg -i libc-bin_2.29-0ubuntu2_amd64.deb libc6_2.29-0ubuntu2_amd64.deb libc6-amd64_2.29-0ubuntu2_i386.deb 

After this, I said "Yes" inside a prompt which says some programs like postgres needs to be restarted.

Then I saw broken packages error.

sudo apt update gives no error. When I try to fix, it shows almost everything needs to removed:

sudo apt install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  alex freeglut3 freeglut3-dev happy hscolour libbsd-dev libdrm-dev libffi-dev
  libgl1-mesa-dev libgles1 libglu1-mesa-dev libglvnd-core-dev libglvnd-dev
  libgmp-dev libgmpxx4ldbl libopengl0 libtinfo-dev libx11-xcb-dev
  libx11-xcb1:i386 libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev
  libxcb-present-dev libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev
  libxcb-sync-dev libxcb-xfixes0-dev libxdamage-dev libxext-dev libxfixes-dev
  libxi-dev libxmu-dev libxmu-headers libxshmfence-dev libxxf86vm-dev
  linux-headers-4.18.0-17 linux-headers-4.18.0-17-generic
  linux-image-4.18.0-17-generic linux-libc-dev linux-modules-4.18.0-17-generic
  linux-modules-extra-4.18.0-17-generic mesa-common-dev x11proto-damage-dev
  x11proto-fixes-dev x11proto-xext-dev x11proto-xf86vidmode-dev
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
The following packages will be REMOVED:
  build-essential cabal-install g++ g++-7 ghc haskell-platform libbsd0:i386
  libc-dev-bin libc6:i386 libc6-amd64:i386 libc6-dbg libc6-dev
  libdrm-amdgpu1:i386 libdrm-intel1:i386 libdrm-nouveau2:i386
  libdrm-radeon1:i386 libdrm2:i386 libedit2:i386 libelf1:i386 libexpat1:i386
  libffi6:i386 libgcc1:i386 libghc-async-dev libghc-attoparsec-dev
  libghc-call-stack-dev libghc-case-insensitive-dev libghc-fgl-dev
  libghc-fixed-dev libghc-gluraw-dev libghc-glut-dev libghc-half-dev
  libghc-hashable-dev libghc-haskell-src-dev libghc-html-dev libghc-http-dev
  libghc-hunit-dev libghc-integer-logarithms-dev libghc-mtl-dev
  libghc-network-dev libghc-network-uri-dev libghc-objectname-dev
  libghc-opengl-dev libghc-openglraw-dev libghc-parallel-dev
  libghc-parsec3-dev libghc-primitive-dev libghc-quickcheck2-dev
  libghc-random-dev libghc-regex-base-dev libghc-regex-compat-dev
  libghc-regex-posix-dev libghc-scientific-dev libghc-split-dev
  libghc-statevar-dev libghc-stm-dev libghc-syb-dev libghc-text-dev
  libghc-tf-random-dev libghc-unordered-containers-dev libghc-vector-dev
  libghc-zlib-dev libgl1:i386 libgl1-mesa-dri:i386 libgl1-mesa-glx:i386
  libglapi-mesa:i386 libglvnd0:i386 libglx-mesa0:i386 libglx0:i386
  libllvm7:i386 libncurses5-dev libnvidia-compute-418:i386
  libnvidia-decode-418:i386 libnvidia-encode-418:i386 libnvidia-fbc1-418:i386
  libnvidia-gl-418:i386 libnvidia-ifr1-418:i386 libpciaccess0:i386
  libsensors4:i386 libstdc++-7-dev libstdc++6:i386 libtinfo5:i386
  libx11-6:i386 libxau6:i386 libxcb-dri2-0:i386 libxcb-dri3-0:i386
  libxcb-glx0:i386 libxcb-present0:i386 libxcb-sync1:i386 libxcb1:i386
  libxdamage1:i386 libxdmcp6:i386 libxext6:i386 libxfixes3:i386
  libxshmfence1:i386 libxxf86vm1:i386 zlib1g:i386 zlib1g-dev
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 97 to remove and 0 not upgraded.
6 not fully installed or removed.
Need to get 5.483 kB of archives.
After this operation, 1.303 MB disk space will be freed.
Do you want to continue? [Y/n] 
  • I added all steps I did.
    – maydin
    Jun 19, 2019 at 20:46
  • Because they are not in 18.04 repos, therefore I got them from 19.04 repo. Problem is everything works in my computer, real old libraries still unchanged probably, just apt has problem.
    – maydin
    Jun 19, 2019 at 21:03
  • Installing wrong-release packages may break your system very horribly...as you have discovered. You are fortunate that your system is still bootable. Your wisest course is to uninstall the 19.04 packages and return your system to the 18.04 packages.
    – user535733
    Jun 19, 2019 at 21:07
  • Yes but I dont want to remove all those packages, because I know nothing is broken except apt. Even if I said yes to something, it gave error at the end.
    – maydin
    Jun 19, 2019 at 21:21

3 Answers 3


Apt isn't broken - it still works just fine. But you have unwisely told apt to make a Frankensystem, mixing packages from different releases of Ubuntu.

Apt won't be able to work out the now-illogical dependencies...ever. (Neither will you). Since apt cannot function, you will never get any more upgrades nor security patches until you remove the wrong-version packages.

We do not provide support for Frankensystems. By definition, they are unstable and prone to unusual and hard-to-diagnose problems. Deb-based systems are designed function with specific versions of packages. Wrong-version packages cause problems.

Remove the wrong-version packages. If you want to run 19.04 packages, then consider installing Ubuntu 19.04. Perhaps in a VM or spare partition if you wish to keep your current 18.04 system.

  • Finally I fixed. I downloaded 2.27 version of same packages and run dpkg in same order as I remember. There was an error like some shared directories are different from other instances of package, I removed those directories and its done.
    – maydin
    Jun 19, 2019 at 22:53
  • @maydin Consider add your solution as an answer. Although user535733 is correct that this was a bad idea, I'm sure you're not the first to do it, nor will you will you be that last. It'll be great to have a documented solution. Jun 19, 2019 at 23:55
  • I waited a day to make sure everything okay. Now added my answer @RyanJ.Yoder
    – maydin
    Jun 20, 2019 at 21:41

I fixed by downloading 2.27 version of all those packages and run dpkg on them.

I tried to install them in same order before I broke. I used dpkg on multiple deb files to prevent cyclic dependencies or something like that also. Not sure if it changes anything.


So, the real solution is to upgrade the distro if you NEED to have a library that comes only with a new distro and is required by a few games ...

So much for the support until 2023 for 18.04 if you plan to play games on your Ubuntu system ... for example, I have three Linux games from 2020, which, once updated, require glibc6-2.29 or later! Except that for me it means to download the new distro ISO and do a full install! since a disptr-upgrade fails ...

  • I just decided to switch to 20.04 LTS, rather than play with modifying deb files. Also that brought the stupid problem of .desktop files not starting from folders (corrected with DEX!)
    – lelorrain
    Jun 8, 2021 at 8:55

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.