title: How to clear Maven 3 cache
body: <p>I develop an Android application using Maven.</p>
  
  <p>I removed several depdendencies from the <code>pom.xml</code> file, then ran <code>mvn clean install</code> and noticed that the removed dependencies are still used in dex invocation (<code>android-maven-plugin:3.5.0:dex</code>).</p>
  
  <p>I deleted <code>.m2/cache</code> directory and put following code in my settings file as an attempt to fix this problem:</p>
  
  <pre><code>&lt;settings&gt;
      &lt;profiles&gt;
        &lt;repositories&gt;
          &lt;repository&gt;
            &lt;releases&gt;
              &lt;enabled/&gt;
              &lt;updatePolicy&gt;always&lt;/updatePolicy&gt;
              &lt;checksumPolicy/&gt;
            &lt;/releases&gt;
            &lt;snapshots&gt;
              &lt;enabled/&gt;
              &lt;updatePolicy&gt;always&lt;/updatePolicy&gt;
              &lt;checksumPolicy/&gt;
            &lt;/snapshots&gt;
            &lt;id/&gt;
            &lt;name/&gt;
            &lt;url/&gt;
            &lt;layout/&gt;
          &lt;/repository&gt;
        &lt;/repositories&gt;       
      &lt;/profiles&gt;
  &lt;/settings&gt;
  </code></pre>
  
  <p>But it didn't help.</p>
  
  <p>How can make Maven aware of the fact that the old dependencies (which I removed from the POM) should not be used in compilation of the application?</p>