Manually Updating Alectrona Patch
This guide is for remediation and troubleshooting workflows, not normal release rollout.
For the standard release process and channel strategy, see Release Rollout and Update Channels.
There may be situations where you need to manually update Alectrona Patch on your computers, such as:
- Troubleshooting issues with the automatic update process.
- Remediating systems that are significantly out of date.
Identifying the Installed Version​
To check the currently installed version of Alectrona Patch on a Mac, you can use the following command in Terminal:
/Library/Application\ Support/Alectrona/Patch/patch --version
If you're using Jamf Pro, you can also configure a Jamf Pro Extension Attribute to report the installed version of Alectrona Patch for easier inventory management.
Manual Update Methods​
Here are some methods to manually update Alectrona Patch:
- Using an Update Script
- Force Update Using the patch CLI
- Using the Package Installer
The recommended way to manually update Alectrona Patch on a Mac is to leverage the patch command-line tool that comes bundled with Alectrona Patch. You can run the following command in Terminal or via your MDM solution to update to the latest version:
#!/bin/bash
patchBin="/Library/Application Support/Alectrona/Patch/patch"
# Function to compare the installed patch with the latest version
function patchCompare() {
"$patchBin" compare alectrona-patch --fail 2>&1 >/dev/null
return $?
}
# Ensure the script is run as root
if (( EUID != 0 )); then
echo "This script must be run as root."
exit 1
fi
# Check if Patch is installed
if [[ ! -f "$patchBin" ]]; then
echo "Patch is not installed."
exit 2
fi
# Use compare subcommand to check if the patch is up to date
if patchCompare; then
echo "Patch is already up to date."
exit 0
fi
# Perform the update
echo "Updating Patch to the latest version..."
"$patchBin" install alectrona-patch
if [[ $? -ne 0 ]]; then
echo "Patch update failed."
exit 5
fi
echo "Patch installation completed successfully."
# Verify the update
if patchCompare; then
echo "Patch was successfully updated to the latest version."
exit 0
else
echo "Patch was not updated to the latest version."
exit 6
fi
exit 0
You can also manually update Alectrona Patch using the patch command-line tool directly. Open Terminal and run the following command:
sudo /Library/Application\ Support/Alectrona/Patch/patch install alectrona-patch --force
This command will download and install the latest version of Alectrona Patch. You may need to enter your administrator password to authorize the update if not executed from your MDM solution.
You can manually download the latest Alectrona Patch installer. Once downloaded, you can then deploy the installer package to your computers using your MDM solution or run it directly on the target machines.
If you are configuring initial installation of Alectrona Patch on systems that do not yet have it installed, we recommend using the scripted installation method for a more robust installation rather than uploading and deploying the package installer directly.