LPIC-1 Linux Installation and Package Management Practice Question
Exhibit
Refer to the exhibit.
```
$ apt-cache showpkg vim
Package: vim
Versions:
2:8.2.3995-1ubuntu2.1 (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal-updates_main_binary-amd64_Packages) (/var/lib/dpkg/status)
Description Language:
File: /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal-updates_main_binary-amd64_Packages
MD5: d41d8cd98f00b204e9800998ecf8427e
2:8.2.3995-1ubuntu1 (/var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal_main_binary-amd64_Packages)
Description Language:
File: /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_focal_main_binary-amd64_Packages
MD5: d41d8cd98f00b204e9800998ecf8427e
Reverse Depends:
vim-tiny,vim
vim-runtime,vim
vim-addon-manager,vim
vim-gtk3,vim
vim-athena,vim
vim-gnome,vim
vim-nox,vim
vim-gtk,vim
Dependencies:
2:8.2.3995-1ubuntu2.1 - libc6 (2 2.31) libacl1 (2 2.2.53) libgpm2 (0 1.20.7) libpython3.8 (0 3.8.2) libselinux1 (2 3.0) libtinfo5 (2 6.2) vim-common (5 2:8.2.3995-1ubuntu2.1) vim-runtime (0 2:8.2.3995-1ubuntu2.1)
2:8.2.3995-1ubuntu1 - libc6 (2 2.31) libacl1 (2 2.2.53) libgpm2 (0 1.20.7) libpython3.8 (0 3.8.2) libselinux1 (2 3.0) libtinfo5 (2 6.2) vim-common (5 2:8.2.3995-1ubuntu1) vim-runtime (0 2:8.2.3995-1ubuntu1)
Provides:
editor
```Refer to the exhibit. Based on the apt-cache showpkg output, which version of vim would be installed if the administrator runs 'apt-get install vim' without specifying a version?
⚠ Common exam trap
Watch out — candidates often assume the repository with the highest priority (e.g., focal-updates) always wins, but APT actually selects the highest version number first, and only uses priority as a tiebreaker when versions are equal.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
2:8.2.3995-1ubuntu2.1 from focal-updates
When no version is specified, apt-get install selects the highest version number from the highest-priority repository. Here, version 2:8.2.3995-1ubuntu2.1 is higher than 2:8.2.3995-1ubuntu1, and focal-updates typically has a higher priority than focal (unless overridden by pinning). Therefore, the candidate version from focal-updates (option D) is installed.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
2:8.2.3995-1ubuntu1 from focal-updates
Why it's wrong here
Version from focal-updates is newer.
- ✗
2:8.2.3995-1ubuntu2.1 from focal
Why it's wrong here
Mismatch: this version is from focal-updates.
- ✗
2:8.2.3995-1ubuntu1 from focal
Why it's wrong here
Older version.
- ✓
2:8.2.3995-1ubuntu2.1 from focal-updates
Why this is correct
Newest version available.
Go deeper
Related to this question
About these practice questions
This LPIC-1 question is part of Courseiva's 527-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LPIC-1 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-1 exam.