1

PROBLEM:

I've had these two packages held back for weeks now and I can't get rid of them,

The following packages have been kept back:
  odbcinst odbcinst1debian2

look here:

[10:53:34][kristjan] ~ ~↓↓$↓↓ sudo apt upgrade --with-new-pkgs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  odbcinst odbcinst1debian2
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
[10:53:44][kristjan] ~ ~↓↓$↓↓ sudo apt-get upgrade --with-new-pkgs
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  odbcinst odbcinst1debian2
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
[10:53:53][kristjan] ~ ~↓↓$↓↓ sudo apt dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  odbcinst odbcinst1debian2
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
[10:55:08][kristjan] ~ ~↓↓$↓↓ sudo apt install odbcinst odbcinst1debian2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  amarok-common amarok-utils apper apper-data avogadro-data cdparanoia cdrdao clamz debconf-kde-data debconf-kde-helper dvd+rw-tools espeak-ng-data festival festival-freebsoft-utils festlex-cmu festlex-poslex festvox-kallpc16k
  gnome-orca gnugo growisofs icoutils k3b-data kalzium-data kate-data kde-baseapps-data kde-runtime-data kdegames-card-data kdegames-mahjongg-data ktorrent-data ktouch-data kwrite libakonadiprotocolinternals1 libatk-adaptor
  libavogadro1 libdebconf-kde1 libdiscid0 libdmtx0a libdotconf0 libespeak-ng1 libestools2.4 libgadu3 libgpgme++2v5 libgpod-common libgpod4 libgpod4-nogtk libjs-mootools libkactivities6 libkcalcore4 libkcmutils4 libkcompactdisc4
  libkdeclarative5 libkdesu5 libkdnssd4 libkexiv2-11 libkexiv2-data libkidletime4 libkimap4 libkjsapi4 libkjsembed4 libkldap4 libkmime4 libkntlm4 libkonq5-templates libkpty4 libkresources4 libkrosscore4 libksane0 libkunitconversion4
  liblastfm1 liblimba0 libloudmouth1-0 libmariadbd18 libmeanwhile1 libmediastreamer-base3 libmusicbrainz5cc2v5 libmygpo-qt1 libntrack-qt4-1 libntrack0 libopenbabel4v5 libortp9 libotr5 libpcaudio0 libperl4-corelibs-perl libphonon4
  libpolkit-qt-1-1 libpoppler-qt4-4 libprison0 libqaccessibilityclient0 libqca2 libqca2-plugin-ossl libqca2-plugins libqimageblitz4 libqjson0 libqmobipocket1 libqrencode3 libqtassistantclient4 libqtscript4-core libqtscript4-gui
  libqtscript4-network libqtscript4-sql libqtscript4-uitools libqtscript4-xml libqtwebkit4 libsgutils2-2 libsolid4 libsonic0 libspeechd2 libtag-extras1 libthreadweaver4 ntrack-module-libnl-0 oxygen-icon-theme palapeli-data phonon
  phonon-backend-gstreamer phonon-backend-gstreamer-common polkit-kde-1 python-attr python-avogadro python-click python-colorama python-constantly python-incremental python-openssl python-pam python-pyasn1-modules python-qt4
  python-qt4-sql python-serial python-service-identity python-sip python-twisted-bin python-twisted-core python-zope.interface python3-brlapi python3-louis python3-pyatspi python3-speechd qhull-bin qtdeclarative4-kqtquickcharts-1
  sound-icons sound-theme-freedesktop speech-dispatcher speech-dispatcher-audio-plugins speech-dispatcher-espeak-ng speech-dispatcher-festival vcdimager xbrlapi
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
  amarok dolphin4 jovie juk k3b k3b-i18n kaccessible kajongg kalzium katepart kcachegrind kchmviewer kde-baseapps kde-baseapps-bin kde-config-cddb kde-full kde-games-core-declarative kde-plasma-desktop kde-runtime kde-standard
  kdeaccessibility kdeadmin kdeedu kdegames kdegraphics kdegraphics-mobipocket kdelibs-bin kdelibs5-plugins kdemultimedia kdenetwork kdepasswd kdepimlibs-kio-plugins kdesdk kdesdk-kio-plugins kdesdk-misc kdesudo kdeutils kdewebdev
  kdoctools kfilereplace kfind kget kgoldrunner kgpg kigo kimagemapeditor kio-audiocd kio-mtp klinkstatus kmag kmousetool kmouth kmtrace kolf kommander konq-plugins konqueror konqueror-nsplugins konquest kopete kpart-webkit kpartloader
  kppp kremotecontrol kreversi ksaneplugin kscd ksirk ksnakeduel kspaceduel ksudoku ktorrent ktouch kubrick kuiviewer kuser libakonadi-contact4 libakonadi-kde4 libakonadi-kmime4 libiodbc2 libk3b6 libk3b6-extracodecs libkabc4
  libkatepartinterfaces4 libkcddb4 libkde3support4 libkdegames6abi1 libkdegamesprivate1abi1 libkdewebkit5 libkemoticons4 libkfile4 libkhtml5 libkio5 libkmediaplayer4 libknewstuff2-4 libknewstuff3-4 libknotifyconfig4 libkonq-common
  libkonq5abi1 libkonqsidebarplugin4a libkopete4 libkparts4 libkpimidentities4 libkpimtextedit4 libkpimutils4 libkprintutils4 libkrossui4 libktexteditor4 libktorrent-l10n libktorrent5 libkxmlrpcclient4 libmailtransport4 libnepomuk4
  libnepomukquery4a libnepomukutils4 libokularcore7 libplasma3 libreoffice-kde libsoprano4 libsyndication4 lskat okular palapeli plasma-scriptengine-javascript python-kde4 soprano-daemon svgpart sweeper task-kde-desktop
The following packages will be upgraded:
  odbcinst odbcinst1debian2
2 upgraded, 0 newly installed, 129 to remove and 0 not upgraded.
Need to get 147 kB of archives.
After this operation, 231 MB disk space will be freed.
Do you want to continue? [Y/n]n

WHAT I'VE TRIED:

According to an article on debian-administration.org,

If the dependencies have changed on one of the packages you have installed so that a new package must be installed to perform the upgrade then that will be listed as "kept-back".

Cautious solution 1:

Per Pablo's answer, you can run sudo apt-get --with-new-pkgs upgrade, and it will install the kept-back packages.

This has the benefit of not marking the kept-back packages as "manually installed," which could force more user intervention down the line (see comments).

If Pablo's solution works for you, please upvote it. If not, please comment what went wrong.

Cautious solution 2:

The cautious solution is to run sudo apt-get install <list of packages kept back>. In most cases this will give the kept-back packages what they need to successfully upgrade.

Aggressive solution:

A more aggressive solution is to run sudo apt-get dist-upgrade, which will force the installation of those new dependencies.

But dist-upgrade can be quite dangerous. Unlike upgrade it may remove packages to resolve complex dependency situations. Unlike you, APT isn't always smart enough to know whether these additions and removals could wreak havoc.

So if you find yourself in a place where the "cautious solution" doesn't work, dist-upgrade may work... but you're probably better off learning a bit more about APT and resolving the dependency issues "by hand" by installing and removing packages on a case-by-case basis.

Think of it like fixing a car... if you have time and are handy with a wrench, you'll get some peace of mind by reading up and doing the repair yourself. If you're feeling lucky, you can drop your car off with your cousin dist-upgrade and hope she knows her stuff.

AND I ALSO TRIED:

[11:06:55][kristjan] ~ ~↓↓$↓↓ sudo aptitude safe-upgrade
Resolving dependencies...                
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.

QUESTION:

How to resolve this and get rid of this irritating warning?

apt policy odbcinst odbcinst1debian2 shows

odbcinst:
  Installed: 2.3.4-1
  Candidate: 2.3.7
  Version table:
     2.3.7 500
        500 https://packages.microsoft.com/debian/9/prod stretch/main amd64 Packages
 *** 2.3.4-1 500
        500 http://deb.debian.org/debian stable/main amd64 Packages
        100 /var/lib/dpkg/status
odbcinst1debian2:
  Installed: 2.3.4-1
  Candidate: 2.3.7
  Version table:
     2.3.7 500
        500 https://packages.microsoft.com/debian/9/prod stretch/main amd64 Packages
 *** 2.3.4-1 500
        500 http://deb.debian.org/debian stable/main amd64 Packages
        100 /var/lib/dpkg/status
3

You’ve added the Microsoft repositories, which contain newer versions of the odbcinst packages, and those conflict with KDE (they “break” libiodc2, which KDE needs via soprano-daemon and libsoprano4).

So you need to choose: either you keep KDE, or you upgrade to the new odbcinst packages; you can’t have both.

To get rid of the “warning”, you can pin the Microsoft repositories to a priority strictly less than 100 like this:

nano /etc/apt/preferences.d/proxmox

and insert:

Package: *
Pin: origin packages.microsoft.com
Pin-Priority: 70

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.