To delete a rule from Ubuntu’s Uncomplicated Firewall (UFW) just list all active rules with

ufw status numbered

Then delete the rule by specifying the line number from the output above:

ufw delete