How to delete old GPS source and redefine

Dear all,
I want to remove the GPS definition after each run and re-define the source by reading the new macro. Because I used the /gps/source/add command in my GPS macro file. So if I don’t clear the old GPS definition, my next run will include 2 GPS definitions (old and new definition). I tried to use /gps/source/clear, but there are errors as shown in the following figure. If I wasn’t using /gps/source/clear, my simulation run normally. Can anyone help me, please?. Thanks in advance.