How to uninstall redis on Centos 8
If you think your server is compromised, then you should really rebuild the entire server. See How do I deal with a compromised server?.
As for the application(s) running redis and redis itself, I would also highly recommend that you spend the time securing it rather than simply removing it. It may be that you have a dependency.
You can do a dnf info redis
to confirm that it is currently installed with dnf:
[root@support]# dnf info redis | grep -A3 ": redis"
Name : redis
Version : 5.0.3
Release : 1.module_el8.0.0+6+ab019c03
Architecture : x86_64
If you don't need redis, and it is currently installed with dnf
, then you can simply remove it with dnf:
dnf remove redis
However, as I mentioned, it's very possible that you have some sort of dependency that requires it. If this is the case, then you'll need to secure redis and your application(s) instead.