Skip to content

Uninstall xinetd Package

An XCCDF Rule

Description

The xinetd package can be removed with the following command:
$ sudo dnf erase xinetd

warning alert: Warning

The package is not available in Red Hat Enterprise Linux 9.

Rationale

Removing the xinetd package decreases the risk of the xinetd service's accidental (or intentional) activation.

ID
xccdf_org.ssgproject.content_rule_package_xinetd_removed
Severity
Low
References
Updated

Remediation Templates

A Puppet Snippet

include remove_xinetd
class remove_xinetd {
  package { 'xinetd':
    ensure => 'purged',
  }
}

script:kickstart

package remove xinetd

An Ansible Snippet

- name: Ensure xinetd is removed
  package:
    name: xinetd
    state: absent
  when: ansible_virtualization_type not in ["docker", "lxc", "openvz", "podman", "container"]
  tags:

Anaconda Pre-Install Instructions

package --remove=xinetd

A Shell Script

# Remediation is applicable only in certain platforms
if [ ! -f /.dockerenv ] && [ ! -f /run/.containerenv ]; then
# CAUTION: This remediation script will remove xinetd
#	   from the system, and may remove any packages
#	   that depend on xinetd. Execute this
#	   remediation AFTER testing on a non-production