Uninstalling v5
You can use the remove command to uninstall MongoDB Foreign Data Wrapper packages. To uninstall, open a terminal window, assume superuser privileges, and enter the command that applies to the operating system and package manager used for the installation. xx is the EDB Postgres Advanced Server version number.
On RHEL or Rocky Linux or AlmaLinux 8:
dnf remove edb-as<xx>-mongo_fdwOn SLES:
zypper remove edb-as<xx>-mongo_fdwOn Debian or Ubuntu
apt-get remove edb-as<xx>-mongo-fdw