Tool to remove a PCR contamination in NGS data
This bash script will get you all of the reads that do not start with your primer sequence. It also handles degeneracy. It requires the tool bioawk. 

It works by looking at the first bases in the read and only prints out the headers that do not have a match with the degenerate primer. Then, comm makes sure that the read was retained in both the R1 and R2 filtering. This allows reads to be filtered whether or not the primers start at the beginning of the R1 or R2 read.

seqtk subseq is where you recover the reads that don't start with the primer.

Be warned though, any off-by-one or sequencing errors will allow some of the sequences with primers at the beginning through. Also, this script requires that the headers for the R1 and R2 reads are the same and aren't appended with anything like "\1", "\2", et cetera.

#!/bin/bash
get_primer_free_starts () {
    bioawk -cfastx 'BEGIN{seqs[0] = "CATGGGAGGGCGATCGCAA"; seqs[1] = "CCTGGGAGGGCGATCGCAA"; \
        seqs[2] = "CGTGGGAGGGCGATCGCAA"; seqs[3] = "CTTGGGAGGGCGATCGCAA"} \
        {thisseq = substr($seq, 1, length(seqs[0])); printme=1\
    for (i=0; i&lt;=3; i++) { \
        if (thisseq != seqs[i]){ \
            printme=0 \
        }
    }; if (printme==1){ \
        print($seq)
    }}' "${INPUT} | sort &gt; "${OUTPUT}
}

INPUT="R1.fastq.gz"
OUTPUT="R1_OK.txt"
get_primer_free_starts

INPUT="R2.fastq.gz"
OUTPUT="R2_OK.txt"
get_primer_free_starts

comm -12 R1_OK.txt R2_OK.txt | sort | uniq &gt; passing_reads.txt

seqtk subseq R1.fastq.gz passing_reads.txt &gt; R1.filtered.fq
seqtk subseq R2.fastq.gz passing_reads.txt &gt; R2.filtered.fq