# git_daemon disappeared during update



## balanga (Nov 15, 2017)

I just tried `pkg install git` and got:-

```
Creating user 'git_daemon' with uid '964'.
pw: user 'git_daemon' disappeared during update
pkg: PRE-INSTALL script failed
```
Anyone seen this before?


----------



## SirDice (Nov 16, 2017)

Yeah, I get that too from time to time. Your password database is out of sync with /etc/passwd. The quickest and simplest solution is to run vipw(8), save and exit without making any changes. That should get them back into sync again.


----------



## GregTheHun (Jan 10, 2019)

I don't know if this worked for balanga, but I tried the vipw trick, no dice for me.


----------



## SirDice (Jan 10, 2019)

The trick only works for errors like "user <blah> disappeared during update", that's an indication the databases are out of sync. You can also try forcing a reinstall: `pkg install -f git`.


----------



## GregTheHun (Feb 22, 2019)

Got that same error as this one indicates, here's my output:

`[greg@freebsd /usr/local/etc]$ pkg install -f git
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        git: 2.20.1

Number of packages to be installed: 1

The process will require 29 MiB more space.

Proceed with this action? [y/N]: y
[1/1] Installing git-2.20.1...
===> Creating groups.
Using existing group 'git_daemon'.
===> Creating users
Creating user 'git_daemon' with uid '964'.
pw: user 'git_daemon' disappeared during update
pkg: PRE-INSTALL script failed`

No dice as well.


----------



## Emrion (Feb 22, 2019)

Already had similar problem and noticed that the vipw method didn't work. However this worked:
`pwd_mkdb -p /etc/master.passwd`
Just another trick I read here from *SirDice.*


----------



## SirDice (Feb 25, 2019)

The vipw(8) trick works but you _must_ save the file (don't make any changes though). The save triggers the rebuild. If you don't save the file nothing is triggered.


----------



## micski (Mar 19, 2019)

I experienced the same problem during installation of Git and the mentioned rebuild of the password database solved it. What causes this problem though?


----------



## unix4you2 (Mar 20, 2019)

Hi everyone,

Some related here... After upgrade git  the *git gui* command stops working.

Doing a reinstallation of git fixes the problem...  Something is broken with the git upgrade, not only the password database.

Regards.


----------



## pez (Feb 5, 2020)

i know it's a year later, but i had the same problem. as above i did "pwd_mkdb -p /etc/master.passwd " which worked. in my experience, if you run vipw you need to actually make a change to trigger it to rebuild. well that's my experience anyway.  my problem was with znc 

[1/1] Installing znc-1.7.5_2...
===> Creating groups.
Using existing group 'znc'.
===> Creating users
Creating user 'znc' with uid '897'.
pw: user 'znc' disappeared during update
pkg: PRE-INSTALL script failed


----------

