# Error when assigning agent policy after data loss

**URL:** <https://discuss.elastic.co/t/error-when-assigning-agent-policy-after-data-loss/356854>\
**Category:** Elastic Agent\
**Tags:** fleet\
**Created:** [April 5, 2024, 9:12am UTC](https://discuss.elastic.co/t/error-when-assigning-agent-policy-after-data-loss/356854 "2024-04-05T09:12:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![malthuis](https://avatars.discourse-cdn.com/v4/letter/m/ad7895/32.png) [@malthuis](https://discuss.elastic.co/u/malthuis)\
**Post date:** [April 5, 2024, 9:12am UTC](https://discuss.elastic.co/t/error-when-assigning-agent-policy-after-data-loss/356854/1 "2024-04-05T09:12:21Z")

</div>

Hello,

a few days ago I had the problem that Kibana was still loading and followed the suggestion to delete everything related to kibana on StackOverflow (which I can't link to from here, but the topic was "Kibana server is not ready yet")

But the problem seemed to be my 90% full hdd, so I was able to resolve it.

Now, when I want to assign an agent policy to an agent in fleet I get the following error message:

"Unable to reassign agent policy: Saved object [ingest-agent-policies/78a088a2-f0b9-45a9-9cd4-86a5679b16dc] not found"

How can I resolve this? Is there any possibility to restore the policies? Unfortunately, I did not have snapshots of the data, since it's a development setup and I'm new to elastic.

Thanks in advance for any help.

---

<div class="post-metadata">

**Author:** ![Julia\_Bardi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julia_bardi/32/79463_2.png) [@Julia\_Bardi](https://discuss.elastic.co/u/Julia_Bardi)\
**Post date:** [May 21, 2024, 9:43am UTC](https://discuss.elastic.co/t/error-when-assigning-agent-policy-after-data-loss/356854/2 "2024-05-21T09:43:33Z")

</div>

Probably the easiest would be to re-enroll the agent to a new agent policy.  
It is not really possible to restore a deleted agent policy when created from the UI.
