LPIC-1 Linux Installation and Package Management Practice Question
An openSUSE administrator needs to add a new repository from a URL and refresh the package cache. Which command sequence accomplishes this?
⚠ Common exam trap
A common mix-up: candidates confuse `zypper` with `apt` or `yum` commands, where `add-apt-repository` or `yum-config-manager --add-repo` combine adding and refreshing in one step, but `zypper` requires two separate commands.
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
✓
zypper addrepo url; zypper refresh
`zypper addrepo url` adds a new repository from the specified URL, and `zypper refresh` updates the package cache to include metadata from all configured repositories. This two-step sequence is the standard method in openSUSE for adding a remote repository and making its packages available for installation.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
zypper install --repo url
Why it's wrong here
Does not add repository permanently.
- ✓
zypper addrepo url; zypper refresh
Why this is correct
Correct sequence to add and refresh.
- ✗
zypper modifyrepo --add url
Why it's wrong here
Modify is for existing repos.
- ✗
zypper repos --add url
Why it's wrong here
Invalid syntax.
Go deeper
Related to this question
About these practice questions
One of 527 original LPIC-1 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. 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.