Bird
0
0

You want to upgrade only the package nginx without upgrading others. Which command should you use?

hard📝 Application Q8 of 15
Linux CLI - Package Management
You want to upgrade only the package nginx without upgrading others. Which command should you use?
Asudo apt upgrade nginx
Bsudo apt install --only-upgrade nginx
Csudo apt update nginx
Dsudo apt autoremove nginx
Step-by-Step Solution
Solution:
  1. Step 1: Understand selective upgrade

    apt install --only-upgrade upgrades specified package only.
  2. Step 2: Differentiate from other commands

    apt upgrade nginx is invalid syntax; apt update nginx is invalid; autoremove removes unused packages.
  3. Final Answer:

    sudo apt install --only-upgrade nginx -> Option B
  4. Quick Check:

    Use 'install --only-upgrade' for single package upgrade [OK]
Quick Trick: Use '--only-upgrade' to upgrade one package [OK]
Common Mistakes:
  • Using 'apt upgrade' with package name
  • Confusing 'update' with upgrade
  • Using 'autoremove' to upgrade

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes