Due to application compatibility issues, the Python 3 OpenSSL library should not be upgraded. Which of the following commands should the systems administrator use to ensure the package stays at the current version?
A.
dpkg --hold python3-openssl
B.
apt set-selections python3-openssl
C.
apt-mark hold python3-openssl
D.
echo " python3-openssl hold " | apt set-selections
Package management is a critical system management task covered extensively in the Linux+ V8 objectives. On Debian-based systems (like Ubuntu), administrators often need to " pin " or " hold " a specific package version to prevent it from being automatically updated during a general system upgrade (apt upgrade). This is commonly done to avoid breaking applications that have strict version dependencies.
The modern and most direct way to accomplish this is using the apt-mark utility. The command apt-mark hold < package_name > marks the package as " on hold " in the package manager database. Once a package is on hold, apt will skip it during upgrades until an administrator explicitly runs apt-mark unhold.
While Option D (echo " package hold " | dpkg --set-selections) is a valid legacy method, apt-mark hold (Option C) is the preferred and more user-friendly standard in contemporary Linux administration. Option A has incorrect syntax for dpkg. Option B uses a non-existent command (set-selections is a sub-module of dpkg, not apt).
Therefore, apt-mark hold is the verified correct answer for ensuring a package remains at its current version.
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