Removing packages via AppStream
Removing packages via AppStream is straightforward. In general, all you need to do is instruct the package manager to remove instead of install. If the package manager finds a module that matches, it will proceed to remove the related packages.
How to do it…
Building off the examples in the previous recipe, let’s remove the Node.js module by running the dnf module remove
nodejs
command:
Figure 10.16 – Output of dnf module remove nodejs
From this message, you can see that NPM will be uninstalled, but that isn’t quite what you would expect considering that the Node.js module installed more than just NPM. If you want to remove everything related to the module, you’ll need to pass in the --all
flag, like so:
# dnf module remove nodejs --all
This time, you will see that all associated packages are queued for removal:
Figure 10.17 – Output of dnf module...