diff --git a/smartgears/dataminer_app/tasks/dataminer-app.yml b/smartgears/dataminer_app/tasks/dataminer-app.yml
index 62ceb4c..a04d3ae 100644
--- a/smartgears/dataminer_app/tasks/dataminer-app.yml
+++ b/smartgears/dataminer_app/tasks/dataminer-app.yml
@@ -40,16 +40,24 @@
       notify: Restart smartgears
 
     - name: Install the dataminer web.xml
-      template: src=web.xml.j2 dest={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }}/WEB-INF/lib/web.xml
+      template: src=web.xml.j2 dest={{ smartgears_instance_path }}/webapps/{{ dataminer_wps_name }}/WEB-INF/web.xml
       notify: Restart smartgears
 
+    - name: Verify if we have the old algorithms setup
+      stat: path={{ smartgears_user_home }}/wps_algorithms/algorithms/AAPS_NASO_PUBLISHER.jar
+      register: old_algo_setup
+
+    - name: Wipe away the algoriths directory if it comes from the old setup
+      file: dest={{ smartgears_user_home }}/wps_algorithms state=absent
+      when: old_algo_setup.stat.exists
+
     - name: Create a directory where to install the algorithms directory
       file: path={{ smartgears_user_home }}/wps_algorithms/algorithms state=directory
       tags: [ 'tomcat', 'dataminer', 'wps', 'dataminer_algorithms', 'dataminer_algorithms_svn' ]
 
     - name: Install the subversion packages 
       become_user: root 
-      apt: pkg=subversion state=present update_cache=yes cache_valid_time=1800 force=yes
+      apt: pkg=subversion state=present update_cache=yes cache_valid_time=1800
 
     - name: Download the WPS algorithms from subversion
       subversion: repo={{ dataminer_wps_algorithms_svn }} dest={{ smartgears_user_home }}/wps_algorithms/algorithms/{{ dataminer_infra_reference }} checkout=yes force=yes update=yes
@@ -77,6 +85,10 @@
       become_user: "{{ d4science_ansible_become_user | default('root') }}"
       template: src=algorithms-updater.j2 dest=/usr/local/bin/algorithms-updater mode=0755
       tags: [ 'tomcat', 'dataminer', 'wps', 'dataminer_algorithms', 'dataminer_algorithms_script' ]
+
+    - name: Remove the list of the installed algorithms if we are upgrading from the old algorithms setup
+      file: dest={{ smartgears_user_home }}/wps_algorithms_install_log/already_installed_algorithms.txt state=absent
+      when: old_algo_setup.stat.exists
       
     - name: Cron job that updates the algorithms repository and adds the missing algorithms configurations
       cron: name="SVN update the algorithms repository" minute="{{ dataminer_algorithms_updater_minute_frequency }}" hour="{{ dataminer_algorithms_updater_hour_frequency }}" job="/usr/local/bin/algorithms-updater > {{ smartgears_user_home }}/wps_algorithms_install_log/algorithms_updater_cron.log 2>&1" user='{{ smartgears_user }}' state={{ dataminer_algorithms_updater_cron }}