Remove specified applications from Linux endpoints using the appropriate package manager for your distribution
This Automox Worklet™ removes specified applications from Linux endpoints by detecting the distribution type and using the appropriate package manager. The Worklet supports multiple Linux flavors including Alpine, Ubuntu, Gentoo, and Fedora.
The script reads the /etc/os-release file to identify which Linux distribution is running, then applies the correct uninstall commands specific to that distribution's package manager. This ensures the application is removed cleanly regardless of which Linux variant endpoints are running.
Each distribution uses different package managers with different command syntax, making manual removal time-consuming and error-prone. Managing software inventory across Linux endpoints becomes complex when you need to support multiple distributions.
By automating removal with this Worklet, you maintain consistent software policies across your Linux infrastructure. You eliminate the risk of incomplete uninstalls, reduce time spent on manual remediation, and maintain audit trails of what software was removed and when.
Evaluation phase: The Worklet identifies the Linux distribution by reading /etc/os-release, then checks if the specified application is currently installed using distribution-specific commands like dpkg -l for Ubuntu, dnf list installed for Fedora, apk info for Alpine, or equery list for Gentoo.
Remediation phase: If the application is found, the Worklet executes the appropriate uninstall command for that distribution, such as dpkg --remove for Ubuntu, dnf remove for Fedora, apk del for Alpine, or emerge --deselect for Gentoo. The Worklet then confirms the uninstallation was successful.
One of the following Linux distributions: Alpine, Ubuntu, Gentoo, or Fedora
Root or sudo access on the endpoint
The APP_NAME variable must be set to the exact name of the application you want to remove
The application must be installed via the distribution's native package manager
After the Worklet runs successfully, the specified application will be completely removed from the endpoint. The package manager removes the application binary, configuration files, and dependencies according to each distribution's uninstall behavior. This automated removal maintains consistent software policies across your Linux infrastructure without manual intervention.
You can verify the removal by checking the package manager on the endpoint. For example, on Ubuntu you can run dpkg -l and grep for the application name to confirm it no longer appears in the installed packages list. Subsequent Worklet evaluations report compliance, demonstrating that the unwanted software remains removed.
Run this Worklet on a pilot Linux endpoint and review evaluation output for enforced uninstall linux.
Confirm Automox activity logs show successful completion and exit code 0.
Verify endpoint state using checks aligned to evaluation script logic, such as elif, else, die.
Validate remediation effects from script operations such as elif, else, die, then rerun evaluation for compliance.
For technical validation, compare endpoint state to the Worklet evaluation logic and remediation flow for enforced uninstall linux. This supports repeatable software lifecycle workflows, faster change control review, and auditable compliance evidence.
Useful script references for this Worklet include evaluation operations such as elif, else, die and remediation operations such as elif, else, die. Use these indicators to verify that endpoint changes match intended policy outcomes.


By submitting this form you agree to our Master Services Agreement and Privacy Policy.
Already have an account? Log in
Consider Worklets your easy button
A Worklet is an automation script, written in Bash or PowerShell, designed for seamless execution on endpoints – at scale – within the Automox platform. Worklet automation scripts perform configuration, remediation, and the installation or removal of applications and settings across Windows, macOS, and Linux.

AUTOMOX + WORKLETS™
Uncover new possibilities with simple, powerful automation.
By submitting this form you agree to our Master Services Agreement and Privacy Policy