Here's a great workbench snippet that uploads a file geodatabase to AGOL, publishes it, updates the view to switch it to your new service, then deletes the old service.
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.