Purging the chat will only work if the messages you are trying to remove have existed for 14 days or eariler.
Or, if Nyx returns an error like "I don't have permission!," make sure the Nyx role has permission to Manage Messages.
"How do I fix it?"
That can be found here.
If the problem persists, or another error shows up after doing this, please join the support server.