# Error running \`nix-update --flake --use-update-script\`

**URL:** https://discourse.nixos.org/t/error-running-nix-update-flake-use-update-script/79244
**Category:** Help
**Created:** [July 30, 2026, 5:54pm UTC](https://discourse.nixos.org/t/error-running-nix-update-flake-use-update-script/79244 "2026-07-30T17:54:07Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![phaeseeKe5Ee](https://discourse.nixos.org/letter_avatar_proxy/v4/letter/p/f0a364/32.png) [@phaeseeKe5Ee](https://discourse.nixos.org/u/phaeseeKe5Ee)
#### Post date: [July 30, 2026, 5:54pm UTC](https://discourse.nixos.org/t/error-running-nix-update-flake-use-update-script/79244/1 "2026-07-30T17:54:07Z")

</div>

I have a personal flake repo that containing some packages. I would like to use `passthru.userScript = nix-update-script {}` in some packages to test thing out.

I can successfully run `nix-update package1 --flake` in the root of the flake repo. However when I run `nix-update package1 --flake --use-update-script` it throws error about `error: path '/home/user/path/of/flake/repo/default.nix' does not exist`

I cannot find any documentation about that in the repo [README.md usage](https://github.com/Mic92/nix-update#usage). My flake only have `flake.nix` but do not have `default.nix`. What should be inside that file? Thanks.

---

<div class="post-metadata">

### Author: ![musjj](https://discourse.nixos.org/user_avatar/discourse.nixos.org/musjj/32/10261_2.png) [@musjj](https://discourse.nixos.org/u/musjj)
#### Post date: [September 6, 2026, 9:33pm UTC](https://discourse.nixos.org/t/error-running-nix-update-flake-use-update-script/79244/2 "2026-09-06T21:33:01Z")

</div>

Did you manage to solve this issue?
