Questions on Download Package Script and Icon transfers

Hi Support,

My first question is whether there is a standard Download Package script. We are asking because we are switching over to workers for one of our dev groups and they have a number of Download Package steps (which do not run on workers). We will need to use the Script (and package reference) step. While different groups will use different methods (inline vs inside package), we wanted to provide a template/sample script. Is the underlying PowerShell code for the Download Package step available?

The second question is that when we’ve done restore/upgrades, we lose the visual icons attached to our projects/steps. Is there a way to retain these when we upgrade our Octopus Production instance?

We are on Octopus v2020.4.2


Hi Alex,

A quick clarification on “Download Package”. Do you mean one of the “Deploy a Package” or “Transfer a Package” steps or another step / process?

I’m not sure about your second question yet. Let me do some research and find out what might be happening. You don’t happen to be running Octopus Server in a docker container?


Hi Ryan,

The “Deploy a package” step is the one that cannot be run on a worker.

For the second question, no docker container. We’ve found in the past the icons get defaulted, but it may have been the restore from Prod to Test prior to the upgrade. I cannot confirm if it was the upgrade itself that defaulted the icons or the restore.


Hey Alex,

For the image issue, the project icons are stored in the Artifacts folder that your server uses. You can check that by navigating to Configuration > Settings > Server Folders.

If your restore process removes those files, that could explain why they disappear.

There’s not really a single script that can be shared for the “Deploy a Package” step. A lot of it is spread out through different .NET classes.

What kinds of packages are the current steps deploying? Package acquisition happens automatically whether it’s a package or a script step, so there shouldn’t be any extra work with switching to script steps.

I wrote a blog post on creating a step template that uses a script step with package references.

You’ll have a variable that provides the path to the extracted package (Octopus.Action.Package[FirebaseDeploy.Package].ExtractedPath in my post).

I hope that’s helpful. Let me know if you have follow up questions.


Got it. I just wanted to check if this was something happens, but not a problem.

Regarding the script, I also ask because I know retention policies on extracted packages/files depends on the “Deploy a package” step being used. If a custom script is used and deploys a package to a location not defaulted as it is in the ‘Deploy a package” step, the retention may not apply. But if not possible, I will check github and other places for package download/extract scripts.


The package retention shouldn’t be an issue with workers. The work folder is cleaned up immediately after use.

But if not possible, I will check github and other places for package download/extract scripts.

I’m sorry, but I think I’m still unclear on the goal here. Download and extraction is handled automatically for the packages and reference packages. You shouldn’t need to script any package download or extract.

If you’re interested, we could schedule a call to discuss?


This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.