The easiest way is going to be simply executing "echo 'y'", and then piping this to the uninstall script, for example:
[root@agent ReleaseAutomationAgent]# echo "y" | ./uninstall
Are you sure you want to completely remove Release Automation Agent and all of its components?
Yes [y, Enter], No [n]
Delete files that were generated during the agent work life
Uninstalling Release Automation Agent 6.3.0.b9713 ...
Finishing uninstallation ...
This same principle applies to windows, the only difference being the uninstall script would have an extension of .cmd or .bat depending on the version, eg;
echo "y" | .\uninstall.cmd