Alpine Linux uses the apk
package manager to manage software packages. To see what package updates are available, you can use the apk update
command to update the package index, and then run the apk version
command to check for updates.
- Update the package index by running the following command:
apk update
- Check for package updates by running the following command:
apk version -u
This command will show you a list of all installed packages and their currently installed version, followed by the latest version available in the repositories. The packages that have updates available will be marked with a ‘<‘ or ‘>’ symbol, indicating that the package is either out of date or a newer version is available.
You can also use the apk info --upgrade
command to show the list of packages that have available upgrades and the package name, version, and repository.
apk info --upgrade
You can then use the apk upgrade
command to upgrade the packages to the latest version, or you can use apk add [package]
command to update a specific package.
apk upgrade
or
apk add [package]
It’s also good practice to reboot after upgrade and keep system updated.