# Balena ENV variables on device removed when moving it between fleets

**URL:** <https://forums.balena.io/t/balena-env-variables-on-device-removed-when-moving-it-between-fleets/374782>\
**Category:** Product support\
**Created:** [September 12, 2025, 11:39am UTC](https://forums.balena.io/t/balena-env-variables-on-device-removed-when-moving-it-between-fleets/374782 "2025-09-12T11:39:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pablo.burgos](https://avatars.discourse-cdn.com/v4/letter/p/dbc845/32.png) [@pablo.burgos](https://forums.balena.io/u/pablo.burgos)\
**Post date:** [September 12, 2025, 11:39am UTC](https://forums.balena.io/t/balena-env-variables-on-device-removed-when-moving-it-between-fleets/374782/1 "2025-09-12T11:39:16Z")

</div>

Hi,

I’ve noticed that when I move a device between fleets (between our DEV and PROD fleets), any variable defined at device level but not at fleet level is removed.

Is this intended? if so, what is the rationale behind?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![myarmolinsky](https://avatars.discourse-cdn.com/v4/letter/m/9dc877/32.png) [@myarmolinsky](https://forums.balena.io/u/myarmolinsky)\
**Post date:** [September 12, 2025, 1:34pm UTC](https://forums.balena.io/t/balena-env-variables-on-device-removed-when-moving-it-between-fleets/374782/3 "2025-09-12T13:34:33Z")

</div>

Hi, when transferring a device between fleets, environment variables on the device level that are for specific services are removed as they are for services that differ from those of the new fleet; even if the services share a name or you pushed the same release to both fleets, the images differ. Environment variables on the device level that are _not_ for specific services, on the other hand, should not be removed.

I found some feature requests related to your questions:

- [Create device variables before the services are applied on the device](https://forums.balena.io/t/create-device-variables-before-the-services-are-applied-on-the-device/373844)
- [Add support for retaining device variables when moving a device to another fleet - #2 by system](https://forums.balena.io/t/add-support-for-retaining-device-variables-when-moving-a-device-to-another-fleet/373289/3)
- [Staging variables for services that aren't yet deployed on a device](https://forums.balena.io/t/staging-variables-for-services-that-arent-yet-deployed-on-a-device/373291)

Please feel free to vote for them if they resonate with you, and it would be helpful if you could share your use case in the ones relevant to you so that we could better understand the reason for the requests.

---

<div class="post-metadata">

**Author:** ![pablo.burgos](https://avatars.discourse-cdn.com/v4/letter/p/dbc845/32.png) [@pablo.burgos](https://forums.balena.io/u/pablo.burgos)\
**Post date:** [September 12, 2025, 2:35pm UTC](https://forums.balena.io/t/balena-env-variables-on-device-removed-when-moving-it-between-fleets/374782/4 "2025-09-12T14:35:03Z")

</div>

Thanks, makes sense, will review the feature requests you provided!
