swupd manages the software update capability of Clear Linux* OS. It can check for valid system updates and, if found, download and install them. It can also perform verification of the system software.
Clear Linux OS uses bundles as the base abstraction for installing functionality on top of the core operating system. Use the swupd tool to install and remove bundles.
This guide assumes:
- The device is on a well-connected network.
- The device is able to connect to the release infrastructure http://update.clearlinux.org
For a full listing of commands and options please see the man page in Clear Linux OS
Clear Linux OS is designed to promote a regular update cadence. swupd helps to make sure that process is simple and secure.
Current OS version and update server info:
Installed version: 23330 Version URL: https://download.clearlinux.org/update/ Content URL: https://cdn.download.clearlinux.org/update/
Clear Linux OS updates are automatic by default but can be set to occur only on demand. To verify your current auto-update setting:
sudo swupd autoupdate
Disable automatic updates:
sudo swupd autoupdate --disable
To re-enable automatic:
sudo swupd autoupdate --enable
sudo swupd check-update
You can update to a specific version or accept the latest as the default with no arguments. Initiate a manual update:
sudo swupd update -m 23330
After a kernel update, reboot immediately for the enhancements to take effect.
swupd can determine whether system directories and files have been added to, overwritten, removed, or modified (e.g., permissions).
sudo swupd verify
All directories that are watched by swupd are verified according to the manifest data and hash mismatches are flagged as follows:
Verifying version 23300 Verifying files ...0% Hash mismatch for file: /usr/bin/chardetect ... ... Hash mismatch for file: /usr/lib/python3.6/site-packages/urllib3/util/wait.py ...100% Inspected 237180 files 423 files did not match Verify successful
In this case, python packages that were installed on top of the default install were flagged as mismatched. swupd can be directed to ignore or fix issues based on command line options.
swupd can correct any issues it detects. Additional directives can be added including a white list of directories that will be ignored, if desired.
The following command will repair issues, remove unknown items, and ignore files or directories matching /usr/lib/python:
sudo swupd verify --fix --picky --picky-whitelist=/usr/lib/python
You can list all of the bundles currently installed on the system
sudo swupd bundle-list --all
Run the following to display a list of bundles that contain a particular binary. Note that it may be present in multiple bundles:
swupd search -b <binary you want>
Start by selecting a bundle from the list of Available bundles. In this example we’re adding dev-utils-dev, which is useful for development.
sudo swupd bundle-add dev-utils-dev
Dependencies common to other bundles will not be removed
sudo swupd bundle-remove dev-utils-dev