Reset project version numbers

Hi,

We started a project that was using a version scheme such as 1...* Then we later decided that it was in an alpha stage and versioned it to something more like 0...* Octopus deploy is picking up the last version with a 1...* and ignoring new builds with major version 0.

How to make octopus forget about the 1...* versions so it will deploy the alpha versions instead?

Thankls

Hi Zach,

Thanks for getting in touch! To reset this, you are gonna have to delete all the releases until you reach the desired number. You could do so by

A) going to [Project Name] -> Releases -> [Release number]-> Edit this release -> Delete

or

B) [This post was eddited to remove this option, as it wasn’t a practice that should be recommended]

Keep in mind that this will not rollback the changes made by your releases, it’ll just delete the entries on the DB so you can start using 0...*.

Hope that helps!

Dalmiro

Hi Zach,

Really sorry to jump in here. Deleting directly from Raven in this case would not be a good idea. When we delete through the interface we clean up more than just the releases but anything attached such as artifacts and deployments. Deleting from Raven like that will cause issues later on with retention policies and in other areas.

There is a command with octo.exe called delete-releases http://docs.octopusdeploy.com/display/OD/Deleting+releases
This allows you to delete a range of releases and it will do it correctly.

Sorry for any confusion.
Vanessa

Hi Vanessa,

Thanks for the direction with octo.exe.

I’ve since manually deleted all the releases through the UI. I saw all but one 1...* version go away. However, one pesky one remains:

[cid:image001.png@01D052A3.AD3EB820]

Had created a couple other projects to try to get a fresh start, but each brought the release list with the package name, I suspect. Any hints how to nix this last one?

Thanks

Hi Zach,

So that looks like a package, does it have a corresponding release? If not, you can delete this file manually from the file system (we index packages but don’t store records in the db) C:\Octopus\OctopusServer\Repository\Packages will be the base directory. Once you have deleted the file then restart the Octopus server service and it will re-index that directory and your final 1.x package should vanish.

Vanessa

Hi Venessa,

I’ve inspected the directory and found only the desired versions (0...*). The offending package is not present in the directory. Anywhere else it might be lurking?’’

Thanks

Hi Zach,

When was the last time the service was restarted to rebuild that package index? It could just be out of date if the file isn’t there.

Vanessa

I had neglected to get to the restart step. Am attempting it now.

Thanks for the help!

After a restart, all is well.

Thanks again!