We have nearly 500 UF's in our environment on Linux hosts. We are planning to upgrade our environment. Can someone help me if anyone has automated the process of upgrading UF on Linux hosts before?
You did not provide a lot of information, so this will be a very generic answer.
But the more important question is: what tool will you use to upgrade the universal forwarder?
One thing to start with: even it is possible you should not use Splunk deployment server to upgrade an universal forwarder.
So, here is a list of examples based on the tool you might use:
if you use Puppet -> https://answers.splunk.com/answers/58396/puppet-module-to-deploy-universalforwarder.html
if you use Chef -> https://github.com/chef-cookbooks/chef-splunk
if you use Ansible -> https://galaxy.ansible.com/scathatheworm/splunk-forwarder/
if you use another tool, ask Google for help there are a lot of instructions available.
Hope this helps ...