Remova a propriedade da consulta String JavaScript

const params = new URLSearchParams(location.search)
params.delete('key_to_delete')
console.log(params.toString())
Puzzled Penguin