There is ‘chef generate recipe’. Is there a command to delete a recipe? If not, what files need to be deleted manually to completely remove a recipe from a cookbook?
they’re just files on the computer. Just delete the files or the recipe etc.
if you use source control just use a rm command in your SCM such as ‘git rm’
You just need to remove the recipe.rb
Be aware that if you’re using that recipe elsewhere in an "include_recipe"
that will fail once the recipe file is deleted.
I see 2 folders, recipes/ and spec/unit/recipes/, where I need to delete files related to a recipe. A chef delete recipe or knife recipe delete command would make this a little easier.
When chef generate recipe name
command is used to create a recipe, there are 3 files created and updated in the below folders. Manually deleting them will remove suffice but make sure that particular recipe isn't included in other recipes.
- /test/integration/default/name.rb
- /spec/unit/recipes/name.rb
- /recipes/name.rb