Our use case involves creating virtual machines and loading them (using the host name as the name of the node chef). Nodes are often deleted and created over and over with the same name. When we destroy the virtual machine, we run two cleanup commands in Chef.
knife node delete --yes NODENAME knife client delete --yes NODENAME
Keep in mind that in our case, we are not interested in storing information about what the node was doing (i.e., a launch list or other attributes).
If you do not want to remove the server, you can run the above two commands to clear the node from the chef server, and then run the following commands on the machine to remove the chef locally. Once you're done, you can again chef load the machine again.
Tom weiss
source share