I'll walk you through two methods for handling this essential task, plus a third way that achieves total annihilation.
Visit the rclone website and follow the instructions for installation of rclone, and configuration of access to the desired service(s). git-remote-rclone can be configured to get git to prune the repo ...