@robhanlon you're looking to use setval and NONE to remove values with a path that targets everything but the values you want to remain
setval
NONE
compact may be relevant as well
compact