Chef cookbook version delete, or update specific version

user3692800 picture user3692800 · Mar 10, 2015 · Viewed 9.8k times · Source

I have long history of a cookbook that has a recipe of the app and is constantly modified. It got to the point where cookbook version is 226. I'm wondering how can upload files to specific cookbook version. I appreciate your help!

Answer

Tejay Cardon picture Tejay Cardon · Mar 10, 2015

when you run knife cookbook upload it will update whatever version is listed in your local metadata.rb file. (unless it is frozen). If you use Berks, you'll need to add the --force option to overwrite an existing version.

deleting a specific version is as easy as knife cookbook delete mycookbook 1.4.3