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.
More questions on this objective
- A mail server keeps filling its root filesystem because spooled mail and logs grow without bound, and when the disk fills the whole system becomes unusable. Which single change to the disk layout most directly contains that failure? machine-checked
- In LVM terminology, which object is created directly on a partition or whole disk so that its storage can be added to a pool? machine-checked
- You are laying out storage for a general-purpose Linux server. Which TWO of the following are genuine reasons to use LVM for the data filesystems rather than plain partitions? machine-checked
- Which file is the configuration file that GRUB 2 generates, and which administrators are told not to edit by hand on a typical Linux distribution? machine-checked
- You replaced the boot disk in a BIOS/MBR system and need to write the GRUB 2 boot loader into the master boot record of /dev/sda, installing the required GRUB modules under /boot. Which command does that? machine-checked
- On a GRUB 2 system whose configuration file is /boot/grub/grub.cfg, type the grub-mkconfig command — including the option and its argument — that regenerates that file. machine-checked