Difference between samtools mark duplicates and samtools remove duplicates? What is difference between samtools mark duplicates and remove duplicates ?  Is it necessary to mark duplicates before removing duplicates with samtools?
samtools rmdup and samtools markdup -r do the same thing. Without the -r flag samtools markdup only flags the duplicates.

You'll have to run samtools fixmate -m and sort the output to add ms and MC tags to prepare the file for markdup..

According to the current documentation, rmdup is obsolete. Please do not use rmdup.