Other Articles

Servers – Ensure X Window System is Not Installed

Support > Fixing Checks > Server

06 March, 2026

This check ensures that X Window System (Xorg) is not installed on servers where a graphical interface is unnecessary.

Removing unused GUI components helps reduce the attack surface and improves overall system security.

Check Details

  • Resource: Server
  • Check: Verify X Window System is not installed
  • Risk: Presence of GUI components like Xorg can increase the system’s attack surface and expose unnecessary services.

Remediation Steps

  1. Ensure you have root or sudo privileges on the system.
  2. Verify if X Window System is installed:

    grep xorg /etc/cos-package-info.json
    
  3. If the command returns any output, it indicates that X Window System components are present.
  4. Remove X Window System packages based on your Linux distribution:
  5. For RHEL / CentOS / Amazon Linux:

    sudo yum remove xorg-x11*
    
  6. For Ubuntu / Debian:

    sudo apt purge xorg*
    
  7. If removal is not feasible due to dependencies (e.g., Java), consider using headless packages instead.
  8. Reboot the system if required:

    sudo reboot
    
  9. Re-run the verification command to ensure X Window System is no longer installed.
  10. For long-term compliance, ensure that your OS images do not include X Window System packages.