diff --git a/for_build/annote_and_1tree/Dockerfile b/for_build/annote_and_1tree/Dockerfile
index 302287293c5327e0c7c9f96c06777c5e3eab4d36..606d9bb32a4f47d1e27496514d3c960731bc91ce 100644
--- a/for_build/annote_and_1tree/Dockerfile
+++ b/for_build/annote_and_1tree/Dockerfile
@@ -25,9 +25,11 @@ RUN git clone https://github.com/tseemann/prokka.git
 RUN /tmp/prokka/bin/prokka --setupdb
 RUN ln -s /tmp/prokka/bin/prokka /usr/local/bin
 
+RUN rm /usr/bin/mafft  # remove mafft installed with bioperl
+
 # Install quicktree
 WORKDIR /tmp
 RUN git clone https://github.com/tseemann/quicktree
 WORKDIR quicktree
 RUN make &&\
-    ln -s /tmp/quicktree/quicktree /usr/local/bin
\ No newline at end of file
+    ln -s /tmp/quicktree/quicktree /usr/local/bin
diff --git a/for_build/barrnap_only/Dockerfile b/for_build/barrnap_only/Dockerfile
index 125659e61a33b92006877b3c2d1187ad43fb1c0c..becaf686b253443c70c0ae06ec1ade08d2735cc4 100644
--- a/for_build/barrnap_only/Dockerfile
+++ b/for_build/barrnap_only/Dockerfile
@@ -24,3 +24,5 @@ RUN wget https://github.com/tseemann/barrnap/archive/0.8.tar.gz &&\
     tar -xf 0.8.tar.gz &&\
     rm 0.8.tar.gz
 RUN ln -s /tmp/barrnap-0.8/bin/barrnap /usr/local/bin
+
+RUN rm /usr/bin/mafft  # remove mafft installed with bioperl
\ No newline at end of file
diff --git a/for_build/basics/Dockerfile b/for_build/basics/Dockerfile
index dd9fda167e23a93f816a8749e0909e23cf155ccb..bed4a7fb9e6a963cbcf02ed70137952a365c0b34 100644
--- a/for_build/basics/Dockerfile
+++ b/for_build/basics/Dockerfile
@@ -17,3 +17,5 @@ RUN apt-get install -y \
 
 # Update pip
 RUN pip3 install --upgrade pip
+
+RUN rm /usr/bin/mafft  # remove mafft installed with bioperl
\ No newline at end of file
diff --git a/for_build/prokka_only/Dockerfile b/for_build/prokka_only/Dockerfile
index 54a54a40616f16c2783458f8f83bf4194d37deab..47c01cd439dbda1b3a1791ad1f5203dee3b02168 100644
--- a/for_build/prokka_only/Dockerfile
+++ b/for_build/prokka_only/Dockerfile
@@ -24,3 +24,5 @@ RUN apt-get install -y\
 RUN git clone https://github.com/tseemann/prokka.git
 RUN /tmp/prokka/bin/prokka --setupdb
 RUN ln -s /tmp/prokka/bin/prokka /usr/local/bin
+
+RUN rm /usr/bin/mafft  # remove mafft installed with bioperl