diff --git a/lib/pdk/module/update_manager.rb b/lib/pdk/module/update_manager.rb
index <HASH>..<HASH> 100644
--- a/lib/pdk/module/update_manager.rb
+++ b/lib/pdk/module/update_manager.rb
@@ -86,13 +86,13 @@ module PDK
         files_to_write = @added_files
         files_to_write += @modified_files.reject { |file| @diff_cache[file[:path]].nil? }
 
-        files_to_write.each do |file|
-          write_file(file[:path], file[:content])
-        end
-
         @removed_files.each do |file|
           unlink_file(file)
         end
+
+        files_to_write.each do |file|
+          write_file(file[:path], file[:content])
+        end
       end
 
       private
Delete files before writing into them

If a template rolls out one of the files we would delete in the regular
course of action, it should be there after the conversion.