LPIC-1 Exam 101, Part 1 of 2, version 5.0 101-500 Question # 20 Topic 3 Discussion
101-500 Exam Topic 3 Question 20 Discussion:
Question #: 20
Topic #: 3
Which of the following apt-get commands will install the newest versions of all currently installed packages without removing any packages or installing new packages that are not already installed?
The apt-get command upgrade will install the newest versions of all currently installed packages without removing any packages or installing new packages that are not already installed. It will only upgrade packages that can be upgraded without changing the dependencies1. The syntax is: apt-get upgrade. For example, apt-get upgrade nginx will update the nginx package to the latest version available in the repositories, if there is one2. The other options are not correct because:
auto-update is not a valid apt-get command.
dist-upgrade will also install new packages or remove existing packages if that is required to resolve a package conflict1. It is more aggressive than upgrade and may change the system in unexpected ways3.
install will install new packages or upgrade existing packages to the specified version1. It may also install or remove dependencies as needed4.
update will only resynchronize the package index files from the sources, but it will not install or upgrade any packages1. References:
What is “dist-upgrade” and why does it upgrade more than “upgrade”? - Ask Ubuntu
How to Install Specific Version of Package using apt-get - TecAdmin
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit