Linux
View all Worklets
LinuxLinux

Enforced Uninstall Linux

Remove specified applications from Linux endpoints using the appropriate package manager for your distribution

Worklet Details

What the application remover for Linux does

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.

Why enforce application removal across Linux environments

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.

How enforced application removal works

  1. 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.

  2. 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.

Requirements for enforced application removal

  • 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

Expected state after application removal

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.

How to validate enforced uninstall linux changes

  1. Run this Worklet on a pilot Linux endpoint and review evaluation output for enforced uninstall linux.

  2. Confirm Automox activity logs show successful completion and exit code 0.

  3. Verify endpoint state using checks aligned to evaluation script logic, such as elif, else, die.

  4. 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.

View in app
evalutation image
remediation image

Consider Worklets your easy button

What's a Worklet?

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.

do more with worklets