Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I know this was asked a long time ago but I still come across this problem every now and again and I always forget how to do it so I figured I would post my solution which I think might be slightly easier (depending on what way you look at it). </p> <p>Basically, I ran a TeamCity build that unfortunately created a duff version of a 3rd party package that I tried to recreate but with a couple of modifications. It didn't work but it meant that I was always being presented with this duff package within the package manager and it will remain like this until the 3rd party releases a newer version. As such I wanted to delete the package from the TeamCity Nuget server and the only way I could find to do this was to delete the build which would also delete the artefacts (the duff Nuget package in this case). </p> <p>Now, I couldn't see a way of deleting the build except with the REST API so that's what I used (I hope I'm not being stupid and there actually is an easy way of deleting builds from the UI). I used fiddler to generate the DELETE command. This was acheived by simply posting a delete request similar to what I've shown below:</p> <p>From fiddler go to the Composer window. Select 'DELETE' instead of 'GET' and enter your TeamCity url in the form below:</p> <pre><code>http://&lt;server&gt;:&lt;port&gt;/httpAuth/app/rest/builds/&lt;build ID&gt; </code></pre> <p>The build ID can be found by simply inspecting the URL when you select the build you want to delete from TeamCity (look for the number after the 'buildId' query parameter). The only other step was to add the authorization header to the command. Enter the following on the line below 'User-Agent' in the Request Headers window.</p> <pre><code>Authorization: Basic (Username:Password encoded as base64) </code></pre> <p>To encode your username/password as base64 go to Tools->Text Wizard in fiddler and enter your TeamCity details in this format - Username:Password. Finally, you should select the 'Execute' button and all being well the build will get deleted along with the Nuget package.</p> <p>This worked for me but obviously be careful when doing all this as you don't want to delete the wrong build. It may be prudent to backup/snapshot your TeamCity server first.</p> <p>Hope this helps someone.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload