Refresh package metadata from the configured repositories on openSUSE.
Do not update installed package files yet.
Which command is appropriate?
zypper refresh updates repository metadata. zypper update applies package updates and is a separate operation.
Detailed explanation
zypper updateIncorrect. zypper update applies package updates.
Incorrect. zypper update applies package updates.
zypper refreshCorrect. zypper refresh updates repository metadata without upgrading installed packages.
Correct. zypper refresh updates repository metadata without upgrading installed packages.
zypper installIncorrect. install adds a package.
Incorrect. install adds a package.
zypper removeIncorrect. remove uninstalls a package.
Incorrect. remove uninstalls a package.
Try it yourself
An example you can run in a temporary verification environment.
zypper help refreshExpected result
refreshサブコマンドの使用法。ネットワーク更新は行わないKey points
- refresh updates metadata
- update changes packages
- The short form is ref
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.