title: Should Inno Setup delete old files on Update?
body: <p>I'm using Inno Setup to install and update my python application.</p>
  
  <p>On update the installer does not delete py files from the previous installation which creates two problems:</p>
  
  <ul>
  <li><p>I'm using plugins: If I delete a plugin in a new version, it is still there for users who performed an update.</p></li>
  <li><p><strike>When uninstalling an updated installation, files from the old installations will not be removed.</strike> (Cannot reproduce...)</p></li>
  </ul>
  
  <p>How can I force Inno Setup to uninstall my application before upgrading?</p>
  
  <p>Here is my Script:</p>
  
  <pre><code>[Setup]
  AppName=Foo
  AppVersion=0.1
  PrivilegesRequired=lowest
  AppId=FooID
  RestartIfNeededByRun=False
  DefaultDirName={localappdata}\Foo
  DisableWelcomePage=True
  DisableReadyPage=True
  OutputDir=.\win
  OutputBaseFilename=setup_Foo
  AllowNoIcons=yes
  DefaultGroupName=Foo
  
  [Files]
  Source: "dist\Foo.exe"; DestDir: "{app}"
  Source: "..\*"; DestDir: "{app}\"; Flags: recursesubdirs; Excludes: "*.pyc,installer"
  
  [Icons]
  Name: "{group}\Foo"; Filename: "{app}\Foo.exe"; WorkingDir: "{app}"
  Name: "{group}\Uninstall Foo"; Filename: "{uninstallexe}"
  
  [Dirs]
  Name: "{app}\plugins"
  
  [Run]
  Filename: "{app}\Foo.exe"; WorkingDir: "{app}"; Flags: nowait postinstall
  </code></pre>