# Trying to remove nixos unstable channels, it doesnt work

**URL:** https://discourse.nixos.org/t/trying-to-remove-nixos-unstable-channels-it-doesnt-work/48321
**Category:** Help
**Created:** [July 2, 2024, 5:22pm UTC](https://discourse.nixos.org/t/trying-to-remove-nixos-unstable-channels-it-doesnt-work/48321 "2024-07-02T17:22:32Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Isukiipko](https://discourse.nixos.org/user_avatar/discourse.nixos.org/isukiipko/32/26676_2.png) [@Isukiipko](https://discourse.nixos.org/u/Isukiipko)
#### Post date: [July 2, 2024, 5:22pm UTC](https://discourse.nixos.org/t/trying-to-remove-nixos-unstable-channels-it-doesnt-work/48321/1 "2024-07-02T17:22:32Z")

</div>

![image](https://discourse.nixos.org/uploads/default/original/3X/b/b/bbb127145072e3a8e4002972a9fe5ad21af1f894.png)  
so im trying to remove the nix channels as im troubleshooting errors when i rebuild the nixos config, how can i do this? i have tried doing the exact links yet it doesnt work.

 ![image](https://discourse.nixos.org/uploads/default/original/3X/e/b/eb6bf42b1767048bfdaf373f118e759084977722.png)

---

<div class="post-metadata">

### Author: ![vcunat](https://discourse.nixos.org/user_avatar/discourse.nixos.org/vcunat/32/11_2.png) [@vcunat](https://discourse.nixos.org/u/vcunat)
#### Post date: [July 2, 2024, 6:05pm UTC](https://discourse.nixos.org/t/trying-to-remove-nixos-unstable-channels-it-doesnt-work/48321/2 "2024-07-02T18:05:57Z")

</div>

You named the two channels `nixos` and `nixpkgs`. So those names should be used for removals…

---

<div class="post-metadata">

### Author: ![vcunat](https://discourse.nixos.org/user_avatar/discourse.nixos.org/vcunat/32/11_2.png) [@vcunat](https://discourse.nixos.org/u/vcunat)
#### Post date: [July 2, 2024, 6:07pm UTC](https://discourse.nixos.org/t/trying-to-remove-nixos-unstable-channels-it-doesnt-work/48321/3 "2024-07-02T18:07:01Z")

</div>

Or you could just edit the file. I suspect the command doesn’t even do anything else.

---

<div class="post-metadata">

### Author: ![Isukiipko](https://discourse.nixos.org/user_avatar/discourse.nixos.org/isukiipko/32/26676_2.png) [@Isukiipko](https://discourse.nixos.org/u/Isukiipko)
#### Post date: [July 2, 2024, 6:12pm UTC](https://discourse.nixos.org/t/trying-to-remove-nixos-unstable-channels-it-doesnt-work/48321/4 "2024-07-02T18:12:34Z")

</div>

doing this now causes this error when rebuilding the config

```auto
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error:
       … <borked>

         at «none»:0: (source not available)

       … while calling the 'import' builtin

         at «string»:1:6:

            1| with import <nixpkgs/nixos> {}; config.system.build.nixos-rebuild
             | ^

       (stack trace truncated; use '--show-trace' to show the full trace)

       error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I)

       at «none»:0: (source not available)
building Nix...
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I)

       at «none»:0: (source not available)
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)

       at «none»:0: (source not available)
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error: file 'nixpkgs/nixos/modules/installer/tools/nix-fallback-paths.nix' was not found in the Nix search path (add it using $NIX_PATH or -I)

       at «none»:0: (source not available)
/tmp/nixos-rebuild.pQgQJw/nix
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)

       at «none»:0: (source not available)
building the system configuration...
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
error: file 'nixpkgs/nixos' was not found in the Nix search path (add it using $NIX_PATH or -I)

       at «none»:0: (source not available)

```

---

<div class="post-metadata">

### Author: ![vcunat](https://discourse.nixos.org/user_avatar/discourse.nixos.org/vcunat/32/11_2.png) [@vcunat](https://discourse.nixos.org/u/vcunat)
#### Post date: [July 2, 2024, 6:25pm UTC](https://discourse.nixos.org/t/trying-to-remove-nixos-unstable-channels-it-doesnt-work/48321/5 "2024-07-02T18:25:04Z")

</div>

Yes… you deleted the channel. I thought that was what you wanted.

---

<div class="post-metadata">

### Author: ![Isukiipko](https://discourse.nixos.org/user_avatar/discourse.nixos.org/isukiipko/32/26676_2.png) [@Isukiipko](https://discourse.nixos.org/u/Isukiipko)
#### Post date: [July 2, 2024, 6:25pm UTC](https://discourse.nixos.org/t/trying-to-remove-nixos-unstable-channels-it-doesnt-work/48321/6 "2024-07-02T18:25:48Z")

</div>

ok i mean yeah, but i added some others back and now it wont work, ill prob get this error somewhere else, thanks anyways, it worked perfectly

---

<div class="post-metadata">

### Author: ![vcunat](https://discourse.nixos.org/user_avatar/discourse.nixos.org/vcunat/32/11_2.png) [@vcunat](https://discourse.nixos.org/u/vcunat)
#### Post date: [July 2, 2024, 6:26pm UTC](https://discourse.nixos.org/t/trying-to-remove-nixos-unstable-channels-it-doesnt-work/48321/7 "2024-07-02T18:26:56Z")

</div>

On a NixOS, the set up is the way that whatever channel is named “nixos” is what’s used as the default expression. So you could add another channel with arbitrary URL under that name `nixos`, for example. (on non-NixOS it’s “nixpkgs”; that’s all from my older memory, hopefully still correct and not outdated or confused)

---

<div class="post-metadata">

### Author: ![jtojnar](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jtojnar/32/70_2.png) [@jtojnar](https://discourse.nixos.org/u/jtojnar)
#### Post date: [July 2, 2024, 6:31pm UTC](https://discourse.nixos.org/t/trying-to-remove-nixos-unstable-channels-it-doesnt-work/48321/8 "2024-07-02T18:31:08Z")

</div>

Do not forget to run `nix-channel --update` after adding channels to make them actually available (see the note in the [description of `--add`](https://nix.dev/manual/nix/2.23/command-ref/nix-channel#description)).

---

<div class="post-metadata">

### Author: ![Isukiipko](https://discourse.nixos.org/user_avatar/discourse.nixos.org/isukiipko/32/26676_2.png) [@Isukiipko](https://discourse.nixos.org/u/Isukiipko)
#### Post date: [July 2, 2024, 6:36pm UTC](https://discourse.nixos.org/t/trying-to-remove-nixos-unstable-channels-it-doesnt-work/48321/9 "2024-07-02T18:36:46Z")

</div>

> [@jtojnar](#):
>
> `nix-channel --update`

same exact error happens 😕

 ![image](https://discourse.nixos.org/uploads/default/original/3X/5/4/54e222917c81e74895bc7f5959df56cb442f21dc.png)

---

<div class="post-metadata">

### Author: ![jtojnar](https://discourse.nixos.org/user_avatar/discourse.nixos.org/jtojnar/32/70_2.png) [@jtojnar](https://discourse.nixos.org/u/jtojnar)
#### Post date: [July 2, 2024, 7:31pm UTC](https://discourse.nixos.org/t/trying-to-remove-nixos-unstable-channels-it-doesnt-work/48321/10 "2024-07-02T19:31:13Z")

</div>

`nixos-rebuild` uses the channels of the `root` user so you need to run all the `nix-channel` commands with `sudo`.

---

<div class="post-metadata">

### Author: ![Isukiipko](https://discourse.nixos.org/user_avatar/discourse.nixos.org/isukiipko/32/26676_2.png) [@Isukiipko](https://discourse.nixos.org/u/Isukiipko)
#### Post date: [July 11, 2024, 1:03pm UTC](https://discourse.nixos.org/t/trying-to-remove-nixos-unstable-channels-it-doesnt-work/48321/11 "2024-07-11T13:03:05Z")

</div>

yup, this worked, sorry for the late answer though lmao.
