# Update fails with "Permission denied"

**URL:** https://discourse.nixos.org/t/update-fails-with-permission-denied/51663
**Category:** Help
**Created:** [September 5, 2024, 10:07am UTC](https://discourse.nixos.org/t/update-fails-with-permission-denied/51663 "2024-09-05T10:07:32Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![lads](https://discourse.nixos.org/user_avatar/discourse.nixos.org/lads/32/28127_2.png) [@lads](https://discourse.nixos.org/u/lads)
#### Post date: [September 5, 2024, 10:27am UTC](https://discourse.nixos.org/t/update-fails-with-permission-denied/51663/2 "2024-09-05T10:27:34Z")

</div>

The Ubuntu man pages provide [a different method](https://manpages.ubuntu.com/manpages/noble/en/man1/nix3-upgrade-nix.1.html) to update nix:

`nix upgrade-nix`

That functions correctly. Apparently the `nix-env --install` formulation is not operational on Ubuntu. However `upgrade-nix` installs the latest stable, currently 2.18.5 (answering my second question).

Luckily there is [an earlier thread](https://discourse.nixos.org/t/update-nix-to-unstable/9550) with a solution to the exact question of installing the latest _ **unstable** _ release.

---

_[View the full topic](https://discourse.nixos.org/t/update-fails-with-permission-denied/51663)._
