I've installed Unifi on fairly unsupported machine:
root@EvoWebsites:/home/pklys# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
unifi : Depends: mongodb-server (< 1:3.6.0) but 1:3.6.3-0ubuntu1 is installed or
mongodb-10gen (< 3.6.0) but it is not installable or
mongodb-org-server (< 3.6.0) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
Now while I am able to manage ugprades of Unifi (the dependency is not really strick on it) I am unable to use apt upgrade anymore for the remaining packages.
Is there a way to "skip" unifi and it's dependency upgrades since I already do manual upgrades of Unifi and tell apt upgrade everything else ignoring what Unifi is saying?
What I've tried:
root@EvoWebsites:/home/pklys# apt-mark hold unifi
unifi was already set on hold.
root@EvoWebsites:/home/pklys# apt update
Hit:1 http://ppa.launchpad.net/ondrej/apache2/ubuntu bionic InRelease
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [83.2 kB]
Hit:3 http://pl.archive.ubuntu.com/ubuntu bionic InRelease
Get:4 http://pl.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:5 http://pl.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:6 http://pl.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [322 kB]
Get:7 http://pl.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [286 kB]
Get:8 http://pl.archive.ubuntu.com/ubuntu bionic-updates/universe i386 Packages [192 kB]
Get:9 http://pl.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [192 kB]
Get:10 http://pl.archive.ubuntu.com/ubuntu bionic-updates/multiverse i386 Packages [4,360 B]
Get:11 http://pl.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [4,200 B]
Fetched 1,247 kB in 1s (2,426 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
98 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@EvoWebsites:/home/pklys# apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
unifi : Depends: mongodb-server (< 1:3.6.0) but 1:3.6.3-0ubuntu1 is installed or
mongodb-10gen (< 3.6.0) but it is not installable or
mongodb-org-server (< 3.6.0) but it is not installable
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
To clarify. The end goal is to upgrade everything except for UNIFI and if it's not possible MongoDB. Ubiquiti with it's newest upgrade added dependency on UNIFI to mongodb 3.4. If you upgrade just like I did to 18.04 you get 3.6 which breaks Unifi. To fix it, I've uninstalled Unifi, reinstalled Unifi and brought the configuration from backup and it works fine on 3.6+ mongodb. My guess is that Ubiquiti doesn't have this process automated for the remaining users so for stable release they added this dependency.
Now since I'm already upgraded I need to keep my machine up to date. So now I need to skip Unifi upgrades (i install them from dpkg directly with skip dependencies), but keep upgrading other stuff.
Hope it explains both the reasons and the end goal.
sudo apt update
first to update the reopistory database on your machine. And, if the problem don't go away runsudo apt --fix-broken install
as the output suggest.