An upgrade is held back because a new version of a package now conflicts with something already installed, so satisfying it requires removing an installed package. Which apt-get subcommand is permitted to do that?

LPIC-1 Exam 101-500, objective 102. Linux installation and package management hard

Machine-checked — no person has signed for it. This question was read against the source cited below by an automated pass, which found no contradiction. That is a weaker claim than it sounds: the same kind of process wrote the question, so it can confirm its own mistake.

Treat it as a good draft rather than as settled fact, and read the source below before you rely on it. It is not used in mock exams here — only questions a person has signed for are.

How these questions are written — where each question comes from, what the verification ledger records, and what happens when one is found wrong.

The options

Correct apt-get dist-upgrade

Correct. dist-upgrade resolves changed dependencies as a whole and may install new packages and remove installed ones to complete the upgrade.

Not correct apt-get upgrade

Wrong. upgrade never removes an installed package; a package whose upgrade would require a removal is simply left at its current version.

Not correct apt-get update

Wrong. update only refreshes the package indexes from the configured repositories and never installs, upgrades or removes anything.

Not correct apt-get check

Wrong. check is a diagnostic that updates the cache and reports broken dependencies; it does not resolve them.

Why

The three verbs form a sequence that is often confused. update refreshes metadata only. upgrade installs the newest versions of packages already installed, under the strict rule that nothing currently installed is removed. dist-upgrade, spelled full-upgrade in the apt front end, lifts that rule so the resolver can add and remove packages when dependencies have been restructured, which is what a release upgrade requires.

Where this comes from

Cited
manual page apt-get(8)

Practise this

Reading one question is not practice. The trainer will draw a short set from objective 102 and space the ones you get wrong.

Practise LPIC-1 Exam 101-500

More questions on this objective

All questions on Linux installation and package management

Practise LPIC-1 Exam 101-500