I am unable to delete an app from APM

Hi,
I have a retired application since more than a week which i am unable to remove from my account.
i have tried the published api for that reason but it keeps on giving an error message as below:

API i tried: New Relic API Explorer
Error Message: “Cannot delete an application that has reported data within the past 12 hours”

App ID: 743221579
Can you please help me remove that application?

Hi @vic , welcome to the Explorers Hub. I would suggest reading through this Level Up post to see if this helps as it is quite relevant!

Relic Solution: Deleting Applications in New Relic One Level Up Relic Solutions

Currently there is no ‘Delete App’ button in the New Relic One UI. This is coming, but until then, below is some information that may help you! Note: This post is sharing the same information found on our docs site here: https://docs.newrelic.com/docs/apm/new-relic-apm/maintenance/remove-applications-new-relic APM APM apps can be deleted via the API, but first they must have stopped reporting to New Relic for long enough for their UI colour code status to turn Grey (where previously green / …

If that doesn’t work out, could you please provide the permalink for the app and we’ll look into it further.

well the application has already turned back to gray since a week and i am unable to remove it with the provided api. and sorry i am new to New Relic but what do you mean by the permalink please?

Hi, @vic: https://docs.newrelic.com/whats-new/share-dashboards-curated-views-permalinks

https://one.nr/0Zyw4LZADw3

Thanks @vic, and can you just confirm that you have followed these steps?

  1. Disable the APM agent:
  • C SDK : Do a quick recompile and deploy. For example, surround your instrumentation in #ifdef , and set the value of YOURNAMESPACE_NEWRELIC_ENABLED with your build system.
  • Go : Set Enabled to false .
  • Java : Set agent_enabled to false .
  • .NET : Set Newrelic.AgentEnabled to false .
  • Node.js : Set agent_enabled to false .
  • PHP : Remove or disable both the newrelic.so and newrelic-daemon components. Set newrelic.enabled to false .
  • Python : Set monitor_mode to false .
  • Ruby : Set agent_enabled to false .
  1. Restart the application server and wait up to ten minutes. Verify the color-coded health status for the app has turned to gray and is no longer reporting data.
  2. To remove the APM application and its browser applications, call the /applications/delete endpoint of the New Relic REST API. For example:

curl -X DELETE ‘https://api.newrelic.com/v2/applications/YOUR_APP_ID.json’ \ -H ‘X-Api-Key:YOUR_API_KEY’ -i

Well no, it was late for me as i was researching the process how to remove the app i found that article. but what we did actually is we removed that server off the network “delete” waited 3 days and tried to delete the app after that but until now more than a week it says that you cannot delete as its still receiving data.

any solution i can use for my case please?

I am having the same problem. Agents were removed, application is not reporting any data, and when I call the API for deletion, it gives me 409:

{“error”:{“title”:“Cannot delete an application that has reported data within the past 12 hours”}}HTTP/1.1 409 Conflict

It’s been over a week of fruitless attempts now.

app id list: 669951001 669729259 669858993 669946709 674299480 669959019 669995547 670511445 669987002 669956258 669857759

https://one.nr/0BoQDoxAajy
https://one.nr/0Zyw4LMkaw3
https://one.nr/01qwLx3EOw5
https://one.nr/0NgR7vgeZwo
https://one.nr/0bEjOPM1OQ6
https://one.nr/0VKQXxX4dQa
https://one.nr/0DvwBpY2Vjp
https://one.nr/0EPwJYP7kQ7
https://one.nr/0JBQr1BPDjZ
https://one.nr/0eqwyJ9LdRn
https://one.nr/0e1wZV8BZw6
https://one.nr/037jb07J3wy

hello again,

just to note that i was able to delete the old application from my account today.
i am not sure if that was a fix from your side or it works by itself anyway thank you.

1 Like

I’ also having the same issue. I was doing some testing and now want to remove all entities from my New Relic account to start fresh. But it’s not allowing me to delete via API whereas the apps were already retired more than 2 weeks ago and shouldn’t be reporting any data to New Relic.

I am bit confused about API key, which key should I use? License key? or randomly generated User Key? Can you be specific? I am a full user of Newrelic ONe and trying to delete an app from APM (it was used by some testing service in a container which no longer exists) I tried the CURL command, using License key, got 401, I also tried a UserKey, got 403