Unable to install Fleet on 8.6.0

Fixed issue by deleting all packages and policies in fleet(they were tested some time in 2020 and 2021.
Referenced this post
This api documentation

And this API calls.

Blockquote
curl -k -X POST -u USER:PASSWORD https://localhost:5601/api/fleet/package_policies/delete -H 'kbn-xsrf: xyz' -H 'Content-Type: application/json' -d '
{
"packagePolicyIds": [
"policy-ID"
],
"force": true
}
'

Blockquote
curl -k -X DELETE -u USER:PASSWORD https://localhost:5601/api/fleet/epm/packages/"package-name"/"package-version" -H 'kbn-xsrf: xyz'