Why does apt-get install a newer dependency than supported by the specified package

Solution 1:

What you're experiencing is the problem with apt / apt-get not being as smart as you think it is.

This problem happens when trying to downgrade your package(s) or install an older package version than the version the repositories have as the latest candidate (with regard to your apt priority pinning and other policies regarding repository priorities). When you downgrade your package, you actually have to specify for each individual dependency which version you're downgrading to, or in this case which specific version you actually want to install.

In the case of the nginx packages, where nginx-full and nginx-common depend on each other, you have to explicitly tell apt to install each of the packages of the specified version(s). This is because 1.7.6-1+trusty1 supersedes 1.7.5-1+trusty1 by version number. As a result, you have to specifically say "Only install the package of this specific version" because of the superseded version(s) existing, i.e. apt-get install nginx-full=1.7.5-1+trusty1 nginx-common=1.7.5-1+trusty1

Not relevant to your question, but this also happens when you install from a repository that has a lower apt pinning priority than another version, in which case you have to specify the versions and/or source(s) to install from manually, i.e. sudo apt-get install nginx-full/trusty-proposed nginx-common/trusty-proposed being a prime example of trying to install a package and dependencies from the proposed repository, which has a much lower apt priority than PPAs or the main repositories.