PMM agent failing to connect

I have installed PMM client using apt-get on Ubuntu 18.

I was able to connect the client with server. Later I needed to change the PMM server, so I uninstalled the client and reinstalled but the agent config file is still the old one located at /usr/local/percona/pmm2/config/pmm-agent.yaml.
Now, I am trying to connect the client to server using pmm-admin config --server-insecure-tls --server-url=https://admin:password@server-url but it is not starting.

I see below errors in /var/log/syslog:

Nov 24 07:43:59 eta-c pmm-agent[119616]: #033[36mINFO#033[0m[2021-11-24T07:43:59.948+00:00] Connecting to https://admin:***@server-url:443/ ...  #033[36mcomponent#033[0m=client
Nov 24 07:43:59 eta-c pmm-agent[119616]: #033[36mINFO#033[0m[2021-11-24T07:43:59.952+00:00] Connected to server-url:443.  #033[36mcomponent#033[0m=client
Nov 24 07:43:59 eta-c pmm-agent[119616]: #033[36mINFO#033[0m[2021-11-24T07:43:59.952+00:00] Establishing two-way communication channel ...  #033[36mcomponent#033[0m=client
Nov 24 07:43:59 eta-c pmm-agent[119616]: #033[31mERRO#033[0m[2021-11-24T07:43:59.956+00:00] Failed to establish two-way communication channel: No Agent with ID "/agent_id/b9ec0ef1-9685-4c89-a5d6-358f80a8ef67".  #033[31mcomponent#033[0m=client

I tried running pmm-agent setup command with various options but it doesn’t work.
Since the agent config file is not deleted upon uninstall how do I get the correct agent ID?