The documentation makes clear that ‘--only-upgrade’ applies its restriction to the packages specified on the command line only. Its purpose is to prevent the user accidentally asking for new software. It is not intended to restrict upgrades of existing software including e.g. if such an upgrade requires a new dependency to be installed.
I do not believe ‘--only-upgrade’ should have its scope changed as requested. Aptitude supports a ‘--no-new-installs’ option to achieve the desired behaviour, however, after some consideration of the matters I do not believe that it is useful enough to justify the additional complexity in the implementation. ** Summary changed: - apt-get --only-upgrade install $PKG installs new packages + 'apt-get install --only-upgrade' should prevent installing new dependencies ** Changed in: apt (Ubuntu) Status: Invalid => Opinion -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/988772 Title: 'apt-get install --only-upgrade' should prevent installing new dependencies To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/988772/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs