Removing content

The following sections describe how to remove content in CentOS 8:

Removing installed packages

This section describes how to remove packages.

Procedure
  • Remove the package:

    # yum remove package

    The package is removed together with any other dependent packages.

Removing installed modules

Removing a module removes all of the packages installed by profiles of the currently enabled module stream, and any further packages and modules that depend on these.

Packages installed from this module stream not listed in any of its profiles remain installed on the system and can be removed manually.

Prerequisites
Procedure
  1. List packages installed from the module:

    $ yum module info module-name | grep module+el8 | sed 's/.*: //g;s/\n/ /g' | xargs yum list installed

    Replace module-name with the name of the module. This will list all packages installed from this module.

  2. Remove the packages listed in the previous step:

    # yum remove package

    Replace package with the packages listed in previous step. You can supply multiple package names separated by spaces. The yum tool will present a summary of the changes and ask for confirmation.

  3. Mark the module profiles as uninstalled:

    # yum module remove module-name

    The currently enabled module stream remains enabled.

  4. Optionally, reset or disable the stream.

Resetting module streams

Resetting a module is an action that returns all of its streams to their initial state - neither enabled nor disabled. If the module has a default stream, that stream becomes active as a result of resetting the module.

Procedure
  • Reset the module state:

    # yum module reset module-name

    All streams of the module are returned to the initial state. No installed content is removed.

Commands for removing content

This section lists commonly used commands for removing content.

Command list
Remove a package
# yum remove package
Remove installed module stream profiles
# yum module remove module-name
Reset all streams of a module to initial state
# yum module reset module-name
Disable a module and all its streams
# yum module disable module-name