Install available newer versions of ordinary packages on openSUSE.
Do more than merely refreshing repository metadata.
Which command is appropriate?
zypper update applies available package updates. refresh only updates the repository information used to determine those updates.
Detailed explanation
zypper reposIncorrect. repos lists configured repositories.
Incorrect. repos lists configured repositories.
zypper refreshIncorrect. refresh updates metadata but does not apply package updates.
Incorrect. refresh updates metadata but does not apply package updates.
zypper searchIncorrect. search finds packages by name or term.
Incorrect. search finds packages by name or term.
zypper updateCorrect. zypper update applies available package updates.
Correct. zypper update applies available package updates.
Try it yourself
An example you can run in a temporary verification environment.
zypper help updateExpected result
updateサブコマンドの使用法。実際の更新は行わないKey points
- update changes package files
- refresh is separate
- The short form is up
Notes
- Environment: openSUSE/Zypper公式仕様
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.