# Nexus is not overwriting artefacts when deploying new version

**URL:** <https://community.sonatype.com/t/nexus-is-not-overwriting-artefacts-when-deploying-new-version/15707>\
**Category:** Sonatype Nexus Repository\
**Created:** [October 23, 2025, 1:51pm UTC](https://community.sonatype.com/t/nexus-is-not-overwriting-artefacts-when-deploying-new-version/15707 "2025-10-23T13:51:25Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Patrick\_Lübbecke](https://avatars.discourse-cdn.com/v4/letter/p/13edae/32.png) [@Patrick\_Lübbecke](https://community.sonatype.com/u/Patrick_L%C3%BCbbecke)\
**Post date:** [October 23, 2025, 1:51pm UTC](https://community.sonatype.com/t/nexus-is-not-overwriting-artefacts-when-deploying-new-version/15707/1 "2025-10-23T13:51:26Z")

</div>

Hi there, we were running a 2021 version of Nexus Repo Community. We have a repository of type “hosted” where we deploy some artefacts to. Currently, there is an artefact which i want to overwrite with new revision. I push with the same version tag via this command:

```auto
mvn deploy:deploy-file ^
  -DgroupId=org.zkoss.zkforge ^
  -DartifactId=ckez ^
  -Dversion=4.21.0.0-jakarta ^
  -Dpackaging=jar ^
  -Dfile=ckez-4.21.0.0-jakarta.jar ^
  -DpomFile=ckez-4.21.0.0-jakarta.pom ^
  -DrepositoryId=nexus ^
  -Durl=https://myuser:myPass@server01:8444/repository/maven-releases/

```

When I look into the .pom on the nexus, I can see that it’s not the same content of the .pom that I just deployed. When I delete this artefact on the server entirely and do another deploy, then Nexus brings back the old revision that I just deleted instead the version I just deployed. Only when I assign a new version tag, the deployed version is shown in Nexus under the new version tag.

Am I doing something wrong?

---

_[View the full topic](https://community.sonatype.com/t/nexus-is-not-overwriting-artefacts-when-deploying-new-version/15707)._
