# Upgrading elastic-agent on Ubuntu

**URL:** <https://discuss.elastic.co/t/upgrading-elastic-agent-on-ubuntu/294736>\
**Category:** Elastic Security\
**Tags:** fleet\
**Created:** [January 18, 2022, 8:50pm UTC](https://discuss.elastic.co/t/upgrading-elastic-agent-on-ubuntu/294736 "2022-01-18T20:50:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![samiusan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/samiusan/32/26120_2.png) [@samiusan](https://discuss.elastic.co/u/samiusan)\
**Post date:** [January 18, 2022, 8:50pm UTC](https://discuss.elastic.co/t/upgrading-elastic-agent-on-ubuntu/294736/1 "2022-01-18T20:50:55Z")

</div>

Hi,

What is the best way of upgrading elastic-agent running on Ubuntu Linux when using a Fleet server?

The Fleet console in Kibana does not give an option to upgrade these agents. I can upgrade elastic-agent running on Windows via this method.

When I try and upgrade using elastic-agent itself on the command line I receive the below:

`root@gremlin2:~# elastic-agent upgrade 7.16.2 The upgrade process of Elastic Agent is currently EXPERIMENTAL and should not be used in production Error: Failed trigger upgrade of daemon: cannot be upgraded; perform upgrading using Fleet For help, please see our troubleshooting guide at https://www.elastic.co/guide/e n/fleet/7.15/fleet-troubleshooting.html `

I can upgrade the elastic-agent package manually using apt but that breaks the enrollment and is fiddly to fix.

What is the correct way to upgrade elastic-agents in this instance?

I'm running Ubuntu 20.04.03, elastic-agent 7.15.2, kibana/Elasticsearch 7.16.2.

cheers,

Michael

---

<div class="post-metadata">

**Author:** ![legoguy1000](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/legoguy1000/32/54301_2.png) [@legoguy1000](https://discuss.elastic.co/u/legoguy1000)\
**Post date:** [January 19, 2022, 4:06am UTC](https://discuss.elastic.co/t/upgrading-elastic-agent-on-ubuntu/294736/2 "2022-01-19T04:06:04Z")

</div>

I think u can only upgrade if u install via the tar.gz method, not of installed via package manager or docker.

---

<div class="post-metadata">

**Author:** ![MichelLaterman](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michellaterman/32/110221_2.png) [@MichelLaterman](https://discuss.elastic.co/u/MichelLaterman)\
**Post date:** [January 20, 2022, 4:59pm UTC](https://discuss.elastic.co/t/upgrading-elastic-agent-on-ubuntu/294736/3 "2022-01-20T16:59:07Z")

</div>

You are correct, fleet managed upgrades are only supported when installed through the `.tar.gz` files

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 17, 2022, 4:59pm UTC](https://discuss.elastic.co/t/upgrading-elastic-agent-on-ubuntu/294736/4 "2022-02-17T16:59:17Z")

</div>

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