OctoPack overwrite or skip existing package in Library

I’m using OctoPack to package projects and upload them into the Library. The version of the package is retrieved from the project’s assembly which is set using the dynamic versioning functionality of .NET (http://stackoverflow.com/a/10230085/411611).

If the package exists and I try to upload it again, Octopus server responds with 400 (Bad Request) because the package already exists.

I’m using Jenkins CI to automate the packaging process and because of this error, the build fails.

Is there a way to tell OctoPack to overwrite an existing package in the Library or skip the upload entirely if it already exists ?


Hi David,

Unfortunately the NuGet push that OctoPack calls doesn’t have a force override option (it isn’t really a behaviour NuGet supports).


Manually updating a package with the same version works using the Octopus site when checking the option ‘Replace this version if it exists’. Do you first delete the existing package to make this work…?
We have projects where all 4 parts of the versionnumber are taken, so we can’t play with auto-incrementing number schemes. Is there any other way to get a package replaced at the end of a build (using TFS in our case)?

Hi Marcel,

Thanks for reaching out. From the WebUI we do “something similar” to deleting and then replacing. But unfortunately Paul’s answer still applies, and NuGet still doesn’t support overwriting.

Sorry for the crappy news,