diff --git a/src/main/java/ui/MainGUI.java b/src/main/java/ui/MainGUI.java
index bc9961ddbf55015c72d18a211e282b5a1f9527b1..dfe19a01db40c7d32118759cf8c35c04a8da4a2f 100644
--- a/src/main/java/ui/MainGUI.java
+++ b/src/main/java/ui/MainGUI.java
@@ -4636,7 +4636,7 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Per
         TraceManager.addDev("Avatar code generation");
         JDialogAvatarExecutableCodeGeneration jgen = new JDialogAvatarExecutableCodeGeneration(frame, this, "Executable Code generation, compilation and execution", ConfigurationTTool.AVATARExecutableCodeHost, SpecConfigTTool.AVATARExecutableCodeDirectory, SpecConfigTTool.AVATARExecutableCodeCompileCommand, SpecConfigTTool.AVATARExecutableCodeExecuteCommand, ConfigurationTTool.AVATARExecutableSoclibCodeCompileCommand, ConfigurationTTool.AVATARExecutableSoclibCodeExecuteCommand, ConfigurationTTool.AVATARExecutableSoclibTraceFile);
         //   jgen.setSize(500, 450);
-        GraphicLib.centerOnParent(jgen, 500, 450);
+        GraphicLib.centerOnParent(jgen, 500, 600);
         jgen.setVisible(true);
         dtree.toBeUpdated();
     }
diff --git a/src/main/java/ui/window/JDialogAvatarExecutableCodeGeneration.java b/src/main/java/ui/window/JDialogAvatarExecutableCodeGeneration.java
index cbb4f90c6352fac3cfceb471d9df84d4da3db248..96273f3ef7bd5b5ab29cbcc470ba617da6b0c69a 100644
--- a/src/main/java/ui/window/JDialogAvatarExecutableCodeGeneration.java
+++ b/src/main/java/ui/window/JDialogAvatarExecutableCodeGeneration.java
@@ -123,13 +123,14 @@ public class JDialogAvatarExecutableCodeGeneration extends javax.swing.JFrame im
     protected JTextField code1, code2, compiler1, compiler2, exe1, exe2, exe3, exe4, exe2int, simulationTraceFile, simulationsoclibTraceFile;
     protected JTabbedPane jp1;
     protected JScrollPane jsp;
-    protected JCheckBox removeCFiles, removeXFiles, debugmode, tracemode, optimizemode, putUserCode;
+    protected JCheckBox removeCFiles, removeOFiles, removeXFiles, debugmode, tracemode, optimizemode, putUserCode;
     protected JComboBox<String> versionCodeGenerator, units;
     protected JButton showSimulationTrace;
 
     private static int selectedUnit = 2;
     private static boolean removeCFilesValue = true;
     private static boolean removeXFilesValue = true;
+    private static boolean removeOFilesValue = false;
     private static boolean debugValue = false;
     private static boolean tracingValue = true;
     //private static boolean optimizeValue = true;
@@ -255,6 +256,10 @@ public class JDialogAvatarExecutableCodeGeneration extends javax.swing.JFrame im
         removeXFiles.setSelected(removeXFilesValue);
         jp01.add(removeXFiles, c01);
 
+        removeOFiles = new JCheckBox("Remove .o files");
+        removeOFiles.setSelected(removeOFilesValue);
+        jp01.add(removeOFiles, c01);
+
         debugmode = new JCheckBox("Put debug information in generated code");
         debugmode.setSelected(debugValue);
         jp01.add(debugmode, c01);
@@ -479,6 +484,7 @@ public class JDialogAvatarExecutableCodeGeneration extends javax.swing.JFrame im
         optimizeModeSelected = optimizemode.isSelected();
         removeCFilesValue = removeCFiles.isSelected();
         removeXFilesValue = removeXFiles.isSelected();
+        removeOFilesValue = removeOFiles.isSelected();
         debugValue = debugmode.isSelected();
         tracingValue = tracemode.isSelected();
         static_putUserCode = putUserCode.isSelected();
@@ -595,6 +601,28 @@ public class JDialogAvatarExecutableCodeGeneration extends javax.swing.JFrame im
                         }
                     }
 
+
+                    if (removeOFiles.isSelected()) {
+                        String pathTmp = code1.getText() + "/lib/generated_src/";
+                        jta.append("Removing all .o files in " + pathTmp + "\n");
+                        list = FileUtils.deleteFiles(pathTmp , ".o");
+                        if (list.length() == 0) {
+                            jta.append("No files were deleted\n");
+                        } else {
+                            jta.append("Files deleted:\n" + list + "\n");
+                        }
+
+                        pathTmp = code1.getText() + "/lib/src/";
+                        jta.append("Removing all .o files in " + pathTmp + "\n");
+                        list = FileUtils.deleteFiles(pathTmp , ".o");
+
+                        if (list.length() == 0) {
+                            jta.append("No files were deleted\n");
+                        } else {
+                            jta.append("Files deleted:\n" + list + "\n");
+                        }
+                    }
+
                     testGo();
 
                     selectedUnit = units.getSelectedIndex();