Reusing Agent Host ID

If you are reinstalling an agent on a host and you wish to use the same hostid used in the previous installation, set the hostid directory location to the same location used in the previous installation.

For example, let's say in the previous installation you use HostIdSearchDir=/root/hostdir while setting the activation key, it creates hostid under /root/hostdir/qualys/. When you uninstall the agent it doesn't remove /root/hostdir/qualys/hostid.

If you are reinstalling the agent on the same machine, and you want to reuse the earlier hostid, set HostIdSearchDir to /root/hostdir.