702-100 practice question 3 of 15
Which FreeBSD command updates packages to newer versions'?
Full set: 60 questionsThe pkg upgrade command in FreeBSD is used to upgrade installed packages to their latest available versions. It compares the versions of packages currently installed on the system against the versions listed in the local repository catalogue. If a newer version is found in the catalogue, pkg upgrade will download and install it. This process is often preceded by pkg update, which updates the local catalogue itself from the remote repository, ensuring the system is aware of the newest package versions before attempting an upgrade.
A. pkg update: This command only updates the local repository catalogue with the latest information from remote servers; it does not install or upgrade any packages.
B. pkg refresh: This is not a valid subcommand for the FreeBSD pkg utility.
D. pkg audit: This command checks installed packages for known security vulnerabilities but does not perform any version upgrades.
E. pkg pull: This is not a valid subcommand for the FreeBSD pkg utility for upgrading packages.
1. FreeBSD Handbook. (2023). Chapter 4. Using pkg for Binary Package Management, Section 4.4.3. Upgrading Installed Packages. The FreeBSD Documentation Project. Retrieved from https://docs.freebsd.org/en/books/handbook/ports/#pkg-upgrade.
Quote: "Upgrading installed packages is also done with pkg. The command is pkg upgrade." This section explicitly identifies pkg upgrade as the correct command for this task.
2. FreeBSD General Commands Manual. (2023). pkg(8). The FreeBSD Project. Retrieved from https://man.freebsd.org/cgi/man.cgi?query=pkg&sektion=8.
Section: COMMANDS, upgrade.
Description: "Upgrade a package to a newer version. The list of packages to upgrade can be specified on the command line, or pkg upgrade can operate on all installed packages." This official manual page confirms the function of the upgrade subcommand.
3. FreeBSD General Commands Manual. (2023). pkg-update(8). The FreeBSD Project. Retrieved from https://man.freebsd.org/cgi/man.cgi?query=pkg-update&sektion=8.
Description: "pkg update is used to update the local copy of the repository catalogue." This distinguishes its function from pkg upgrade.
Keep practicing
Take the free 702-100 practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other 702-100 practice questions
- Question 1Which command can be used to display the local filesystems that are currently mounted'?
- Question 2Which line in a cron job runs myscript once per hour?
- Question 4Assuming a umask of 022, what are the default permissions in octal mode of the newly crea…
- Question 5A file called mybackup is found while investigating a USB pen drive. Which utility can be…
- Question 6Which of the following excerpts is a valid if condition in the Bourne shell?
- Question 7Which of the following lines in /etc/fstab mounts the device /dev/cd0a to /cdrom?
