How to change the IP from static to DHCP via command line

I have set the IP address to static but this was a mistake because I am using HA in a VM running under Unraid.
Presently my HA VM does not receive an IP.

It possible to reverse the IP from static to dynamic via DHCP using the command line interface?

Don’t forget you can get help from the command line with --help. Yes you can, using network update ipv4-method/ipv6-method:

thanks for the answer.
My network interface is enp4s0 and I have tried
“nmcli device modify enp4s0 ipv4.method auto” but I receive an error that the device is deactivated.

I could resolve the issue. Thanks