DELETE YOUR POLICY

Deleting the policy is a straightforward process. ALL artifacts that were created during the policy generation process will be permanently destroyed. This includes:

  • security.json
  • security.js
  • security/

There are 2 ways to delete your policy:

# standard removal from the file system via the command line
$ rm security.*
$ rm -rf security/

Alternatively, you can run _spartan --delete from the command prompt. You’ll be asked to confirm your decision

$ _spartan --delete
        ___   ___     _     ___   _____     _     _  _
       / __| | _ \   /_\   | _ \ |_   _|   /_\   | \| |
  ___  \__ \ |  _/  / _ \  |   /   | |    / _ \  | .` |
 |___| |___/ |_|   /_/ \_\ |_|_\   |_|   /_/ \_\ |_|\_|
                                                                     by @darkmsph1t
? Are you sure? This action is not reversable. (Y/n)

Both deletion successes and failures will be provided back to stdout, but you can also check by using file system methods

ERRORS

  • (policy/no-policy-found) => ENOENT, no entity errors will be thrown if either security.json or security.js cannot be found

    # post-deletion messages
    File was not deleted ENOENT /[path to your project]/security.js
    /[path to your project]/security.json was deleted successfully.