# The dbt deps fails to update packages in GitLab when branch is updated because of package-lock.yml

**URL:** <https://discourse.getdbt.com/t/the-dbt-deps-fails-to-update-packages-in-gitlab-when-branch-is-updated-because-of-package-lock-yml/13182>\
**Category:** Help\
**Tags:** dbt-core\
**Created:** [May 3, 2024, 3:12pm UTC](https://discourse.getdbt.com/t/the-dbt-deps-fails-to-update-packages-in-gitlab-when-branch-is-updated-because-of-package-lock-yml/13182 "2024-05-03T15:12:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ortizfabio](https://avatars.discourse-cdn.com/v4/letter/o/e47774/32.png) [@ortizfabio](https://discourse.getdbt.com/u/ortizfabio)\
**Post date:** [May 3, 2024, 3:12pm UTC](https://discourse.getdbt.com/t/the-dbt-deps-fails-to-update-packages-in-gitlab-when-branch-is-updated-because-of-package-lock-yml/13182/1 "2024-05-03T15:12:52Z")

</div>

I created my own macro package repo in GitLab. I am currently working in a branch lets say I named the branch BRC-001. The first time that I updated the packages.yml with my repo it successfully worked. It appear that it creates a file package-lock.yml where it captures the revision of my branch. So when I update my macros packages the branch is the same BRC-001 but the revision changes. It looks like when I do a dbt deps it checks if the file packages.yml has changed or not. In this case it has not because I am working in the same branch but since I just committed new changes to that branch there is a new revision in the head of it. However my deps command never updated my packages because of the lock file. It keeps pulling the same revision. Once I delete the lock file it brought the new revision of the branch.  
packages.yml:

```auto
packages:
  - package: dbt-labs/dbt_utils
    version: 1.1.1
  - git: "https://{{env_var('GITLAB_USERNAME')}}:{{env_var('GIT_TOKEN')}}@gitlab.com/my_company/dbt-macro-library"
    revision: DAP-BRC-001

```

Here is the package-lock.yml:

```auto
packages:
- package: dbt-labs/dbt_utils
  version: 1.1.1
  - git: "https://{{env_var('GITLAB_USERNAME')}}:{{env_var('GIT_TOKEN')}}@gitlab.com/my_company/dbt-macro-library
  revision: 4d74dda7bb39535bb4390d56da2ed7f77f834985

```
