Removing content
The following sections describe how to remove content in CentOS 8:
-
Removing installed packages describes removing a package.
-
Removing installed modules describes removing content installed from a module stream.
-
Resetting module streams describes resetting module streams to initial state.
-
Commands for removing content summarizes the commands for removing content.
Removing installed packages
This section describes how to remove packages.
-
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.
-
A module which you want removed must have already installed some profiles.
-
You must understand modular dependency resolution.
-
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.
-
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. -
Mark the module profiles as uninstalled:
# yum module remove module-name
The currently enabled module stream remains enabled.
-
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.
-
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.
- 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