From ccf512f4b865461b6957893dfc21a3f08a1f0cdb Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Mon, 15 May 2023 10:06:27 +1200 Subject: [PATCH 1/6] docs: Remove redundant uninstall command `sudo systemctl disable nix-daemon.socket nix-daemon.service` removes these files already. --- doc/manual/src/installation/uninstall.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/doc/manual/src/installation/uninstall.md b/doc/manual/src/installation/uninstall.md index bd85b49ee..2f84a02bb 100644 --- a/doc/manual/src/installation/uninstall.md +++ b/doc/manual/src/installation/uninstall.md @@ -24,12 +24,6 @@ If you are on Linux with systemd: sudo systemctl daemon-reload ``` -1. Remove systemd service files: - - ```console - sudo rm /etc/systemd/system/nix-daemon.service /etc/systemd/system/nix-daemon.socket - ``` - 1. The installer script uses systemd-tmpfiles to create the socket directory. You may also want to remove the configuration for that: From 3cc9b8630b5651372533f0e11324ba565a2c98a1 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Mon, 15 May 2023 10:13:46 +1200 Subject: [PATCH 2/6] docs: Remove Nix profile content from correct directory At least on Ubuntu 22.04, the Nix installer creates `/etc/profile.d/nix.sh`, not `/etc/profile/nix.sh`. --- doc/manual/src/installation/uninstall.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/manual/src/installation/uninstall.md b/doc/manual/src/installation/uninstall.md index 2f84a02bb..870d6bed7 100644 --- a/doc/manual/src/installation/uninstall.md +++ b/doc/manual/src/installation/uninstall.md @@ -34,7 +34,7 @@ If you are on Linux with systemd: Remove files created by Nix: ```console -sudo rm -rf /nix /etc/nix /etc/profile/nix.sh ~root/.nix-profile ~root/.nix-defexpr ~root/.nix-channels ~/.nix-profile ~/.nix-defexpr ~/.nix-channels +sudo rm -rf /nix /etc/nix /etc/profile.d/nix.sh ~root/.nix-profile ~root/.nix-defexpr ~root/.nix-channels ~/.nix-profile ~/.nix-defexpr ~/.nix-channels ``` Remove build users and their group: From 17a1c1ee4ed9c59fff08e0ec3d7ca26cbae5fd53 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Mon, 15 May 2023 10:14:33 +1200 Subject: [PATCH 3/6] docs: Sort files by name --- doc/manual/src/installation/uninstall.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/manual/src/installation/uninstall.md b/doc/manual/src/installation/uninstall.md index 870d6bed7..6fad20eac 100644 --- a/doc/manual/src/installation/uninstall.md +++ b/doc/manual/src/installation/uninstall.md @@ -34,7 +34,7 @@ If you are on Linux with systemd: Remove files created by Nix: ```console -sudo rm -rf /nix /etc/nix /etc/profile.d/nix.sh ~root/.nix-profile ~root/.nix-defexpr ~root/.nix-channels ~/.nix-profile ~/.nix-defexpr ~/.nix-channels +sudo rm -rf /etc/nix /etc/profile.d/nix.sh /nix ~/.nix-channels ~/.nix-defexpr ~/.nix-profile ~root/.nix-channels ~root/.nix-defexpr ~root/.nix-profile ``` Remove build users and their group: @@ -48,8 +48,8 @@ sudo groupdel nixbld There may also be references to Nix in -- `/etc/profile` - `/etc/bashrc` +- `/etc/profile` - `/etc/zshrc` which you may remove. From e26aad22c61d65b2882892c4cbf394f10ebe49e5 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Mon, 15 May 2023 10:26:47 +1200 Subject: [PATCH 4/6] docs: Remove references to non-existing files At least on Ubuntu 22.04, these files are not created as part of a multi- user installation. --- doc/manual/src/installation/uninstall.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/manual/src/installation/uninstall.md b/doc/manual/src/installation/uninstall.md index 6fad20eac..0c0c07bfc 100644 --- a/doc/manual/src/installation/uninstall.md +++ b/doc/manual/src/installation/uninstall.md @@ -34,7 +34,7 @@ If you are on Linux with systemd: Remove files created by Nix: ```console -sudo rm -rf /etc/nix /etc/profile.d/nix.sh /nix ~/.nix-channels ~/.nix-defexpr ~/.nix-profile ~root/.nix-channels ~root/.nix-defexpr ~root/.nix-profile +sudo rm -rf /etc/nix /etc/profile.d/nix.sh /nix ~root/.nix-channels ~root/.nix-defexpr ~root/.nix-profile ``` Remove build users and their group: From ed016a5bb0796f1aa01af6d081d3599a59cb05df Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Mon, 15 May 2023 11:03:27 +1200 Subject: [PATCH 5/6] docs: Mention more files referenced by the installer `/etc/bash.bashrc` is backed up as `/etc/bash.bashrc.backup-before-nix`, but since other changes might have been introduced in the meantime we can't just tell the user to revert. --- doc/manual/src/installation/uninstall.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/manual/src/installation/uninstall.md b/doc/manual/src/installation/uninstall.md index 0c0c07bfc..7643b535b 100644 --- a/doc/manual/src/installation/uninstall.md +++ b/doc/manual/src/installation/uninstall.md @@ -48,8 +48,10 @@ sudo groupdel nixbld There may also be references to Nix in +- `/etc/bash.bashrc` - `/etc/bashrc` - `/etc/profile` +- `/etc/zsh/zshrc` - `/etc/zshrc` which you may remove. From 6e1bfb93dce77073ceff4695ee13b689f1fab9b3 Mon Sep 17 00:00:00 2001 From: Victor Engmark Date: Mon, 15 May 2023 11:05:26 +1200 Subject: [PATCH 6/6] refactor: Join commands to remove files --- doc/manual/src/installation/uninstall.md | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/doc/manual/src/installation/uninstall.md b/doc/manual/src/installation/uninstall.md index 7643b535b..9ead5e53c 100644 --- a/doc/manual/src/installation/uninstall.md +++ b/doc/manual/src/installation/uninstall.md @@ -24,17 +24,10 @@ If you are on Linux with systemd: sudo systemctl daemon-reload ``` -1. The installer script uses systemd-tmpfiles to create the socket directory. - You may also want to remove the configuration for that: - - ```console - sudo rm /etc/tmpfiles.d/nix-daemon.conf - ``` - Remove files created by Nix: ```console -sudo rm -rf /etc/nix /etc/profile.d/nix.sh /nix ~root/.nix-channels ~root/.nix-defexpr ~root/.nix-profile +sudo rm -rf /etc/nix /etc/profile.d/nix.sh /etc/tmpfiles.d/nix-daemon.conf /nix ~root/.nix-channels ~root/.nix-defexpr ~root/.nix-profile ``` Remove build users and their group: