Remove File from Cookbook?


#1

Hi,

is there a simple possibillity to remove a file from a cookbook?

If I just delete the file doing a knife upload afterwards the file is still existent within chef, which is shown when I download the cookbook again with knife download.

Thanks for your help.


#2

Version: Chef: 12.3.0


#3

Current workaround is to create a new version of a cookbook where the unwanted file is deleted before the new cookbook version is initially uploaded.


#4

Well deleting a file from a cookbook without bumping this cookbook version can lead to this kind of edge case because bookshelf is not a git repo, bookshelf checks the checksums of files before writing them to disk and linking this file to the cookbook version, a deletion can’t be checksumed, so the old file is still linked to the cookbook version.