Several newer RPM files are in the working directory.
Update only packages that have a corresponding installed version; do not add new packages.
Which command is appropriate?
rpm -F is the freshen operation. It updates matching installed packages but skips RPMs for packages that are not currently installed.
Detailed explanation
rpm -Uvh *.rpmIncorrect. -U would also install packages that are not currently installed.
Incorrect. -U would also install packages that are not currently installed.
rpm -Fvh *.rpmCorrect. rpm -Fvh *.rpm updates only packages that are already installed.
Correct. rpm -Fvh *.rpm updates only packages that are already installed.
rpm -ivh *.rpmIncorrect. -i installs packages and does not implement the freshen behavior.
Incorrect. -i installs packages and does not implement the freshen behavior.
rpm -qa *.rpmIncorrect. -q queries the database rather than applying updates.
Incorrect. -q queries the database rather than applying updates.
Try it yourself
An example you can run in a temporary verification environment.
rpm --help | grep -E -- '--freshen|-F'Expected result
freshen操作の説明。実際の更新は行わないKey points
- -F means freshen
- The installed state is checked
- New packages are skipped
Notes
- Environment: RPM 4.19〜6.x公式仕様
- 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.