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
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.
A more aggressive solution is to run
sudo apt-get dist-upgrade, which will force the installation of those new dependencies.
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.
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