This section describes how to uninstall an F5 NGINX Plus dynamic module.
You may need to uninstall a dynamic module in NGINX Plus in several scenarios:
-
The module is being replaced with a newer or alternative version. For example, the OpenTracing module has been replaced by the OpenTelemetry module. The Cookie-Flag dynamic module has been superseded by natively supported
proxy_cookie_flagsdirective. -
The module is no longer supported, for example, the NGINX ModSecurity WAF module.
-
The operating system is not supported by the module. See the the Dynamic Modules section of the NGINX Plus Technical Specifications.
-
The module it is no longer required, uninstalling it helps optimize resource usage and reduce maintenance overhead.
-
The module is causing runtime errors or configuration conflicts that affect stability or performance.
-
Security or compliance policies require removal, particularly in regulated environments where only approved or certified modules are allowed.
Instructions
Section titled “Instructions”To uninstall a dynamic module, run the appropriate command for your operating system in a terminal, replacing <MODULE-NAME> with the actual package name, for example, nginx-plus-module-cookie-flag.
-
For Amazon Linux 2, CentOS, Oracle Linux, and RHEL:
Terminal window sudo yum remove -
For Amazon Linux 2023, AlmaLinux, Rocky Linux:
Terminal window sudo dnf remove -
For Debian and Ubuntu:
Terminal window sudo apt remove -
For SLES:
Terminal window sudo zypper remove -
For FreeBSD:
Terminal window sudo pkg delete
Configuration
Section titled “Configuration”After uninstalling the package, you will need to disable the module in the NGINX configuration file.
-
In a text editor, open the NGINX Plus configuration file:
/etc/nginx/nginx.conffor Linux/usr/local/etc/nginx/nginx.conffor FreeBSD
-
Disable dynamic loading of the module by removing the corresponding
load_moduledirective. -
Remove all directives related to the dynamic module.
-
Save the configuration.
-
Test the NGINX Plus configuration. In a terminal, type-in the command:
Terminal window nginx -tExpected output of the command:
Terminal window nginx: the configuration file /etc/nginx/nginx.conf syntax is oknginx: configuration file /etc/nginx/nginx.conf is successful -
Reload the NGINX Plus configuration:
Terminal window nginx -s reload