# Deleting Registry Values

You can use CFREGISTRY with the DELETE action to delete registry keys and values.

Note | Be careful when using the DELETE action; if you delete a key, CFREGISTRY also deletes all values and subkeys defined beneath the key.

| To delete a registry value:

Call the CFREGISTRY tag with the DELETE action, specifying the branch and value name:

    <CFREGISTRY ACTION="Delete"
        BRANCH="HKEY_LOCAL_MACHINE\Software\cflangref"
        ENTRY="LastCFM01">

| To delete a registry key:

Call the CFREGISTRY tag with the DELETE action, specifying the branch of the key to be deleted (including the key name):

    <CFREGISTRY ACTION="Delete"
        BRANCH="HKEY_LOCAL_MACHINE\Software\cflangref">