If you do not require the policy anymore, you can delete it by using the command: curl -X DELETE "http://{elastic_ip}:9200/_slm/policy/ nightly-snapshots.
NOTE:The elastic_ip can be either the IP of the node in case you are in dashboard cluster or 127.0.0.1, in case you are not using the cluster configuration.
NOTE:This command does not delete snapshots taken, but only the snapshot policy.