Bird
0
0

What will happen if you run sudo apt upgrade -y?

medium📝 Command Output Q5 of 15
Linux CLI - Package Management
What will happen if you run sudo apt upgrade -y?
AInstalls new packages
BUpgrades all packages without asking for confirmation
CUpgrades only security updates
DRemoves unused packages
Step-by-Step Solution
Solution:
  1. Step 1: Understand 'apt upgrade'

    This command upgrades all installed packages to latest versions.
  2. Step 2: Understand '-y' flag

    The '-y' flag automatically answers yes to prompts, so no confirmation needed.
  3. Final Answer:

    Upgrades all packages without asking for confirmation -> Option B
  4. Quick Check:

    'apt upgrade -y' = auto confirm upgrade [OK]
Quick Trick: Use '-y' to skip prompts during upgrade [OK]
Common Mistakes:
  • Thinking it upgrades only security patches
  • Confusing upgrade with install
  • Assuming it removes packages

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Linux CLI Quizzes