Skip to content

Uninstall httpd Package

An XCCDF Rule

Description

The httpd package can be removed with the following command:

$ sudo yum erase httpd

Rationale

If there is no need to make the web server software available, removing it provides a safeguard against its activation.

ID
xccdf_org.ssgproject.content_rule_package_httpd_removed
Severity
Unknown
References
Updated



Remediation - Anaconda Pre-Install Instructions


package --remove=httpd

Remediation - Ansible

- name: Ensure httpd is removed
  package:
    name: httpd
    state: absent
  tags:
  - NIST-800-53-CM-6(a)

Remediation - Puppet

include remove_httpd

class remove_httpd {
  package { 'httpd':
    ensure => 'purged',
  }

Remediation - Shell Script


# CAUTION: This remediation script will remove httpd
#	   from the system, and may remove any packages
#	   that depend on httpd. Execute this
#	   remediation AFTER testing on a non-production
#	   system!