You could convert the file from BAM to SAM, then use your favorite language to remove the offending tags from each line (sed, awk, perl, python, and even Samtools only C library), and then finally convert back to BAM. The rest is left as an exercise to the reader.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
what is 'types' ? a SAM flag ? what is the B flag ? Why cannot you use a newer picard ibrary ?