how to remove range from fasta header
Invest some time in learning unix tools such as grep, sed and awk.

sed -r '/^&gt;/s/:[0-9]+-[0-9]+//' input.fasta &gt; output.fasta


This line of code matches the pattern :&lt;numbers&gt;-&lt;numbers&gt; on lines that start with &gt; (FASTA sequence headers) and replaces that pattern with '', essentially removing text that matches the pattern.