Clear Collection Data at once

Hi, pretty new to Code.

On which page would you put that code?

Does it matter, can it be any of them?

Also do you then just delete it and go on as normal once it is done?

Thanks for your time in advance, ste.