I have a URL with a long query string attached to it. After the page loads, I do not require the query string. So I want to remove the query string from the address bar with
That is achievable in modern browsers using the history api, but probably isn't the best solution to your problem.
history.replaceState({}, 'some title', '/');
It sounds like you would be better off processing the data and then redirecting to the homepage instead of returning an HTML document directly.
Since you aren't wanting to keep the URL around, it won't be useful for bookmarking, so it is quite likely you would be better off making a POST request.
This suggests that you should be using the POST-Redirect-GET pattern.