From cc620d961f1fa68038ef44f5947fc053708ab3ad Mon Sep 17 00:00:00 2001 From: Liu Xiaoyi Date: Sun, 20 Nov 2022 20:04:22 +0800 Subject: [PATCH 1/3] Updated uninstall guide involving systemd Co-authored-by: sequencer --- .../src/installation/installing-binary.md | 32 +++++++++++++------ 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/doc/manual/src/installation/installing-binary.md b/doc/manual/src/installation/installing-binary.md index 31faeadc2..1b7db59cd 100644 --- a/doc/manual/src/installation/installing-binary.md +++ b/doc/manual/src/installation/installing-binary.md @@ -88,6 +88,28 @@ extension. The installer will also create `/etc/profile.d/nix.sh`. ### Linux +To begin, if you are on Linux with systemd, remove the Nix daemon service: + +```console +sudo systemctl stop nix-daemon.socket +sudo systemctl stop nix-daemon.service +sudo systemctl disable nix-daemon.socket +sudo systemctl disable nix-daemon.service +sudo systemctl daemon-reload +``` + +Then you can remove systemd service files: + +```console +sudo rm -f /etc/systemd/system/nix-daemon.service /etc/systemd/system/nix-daemon.socket +``` + +Also, the installer script uses systemd-tmpfiles (if presents) to create the socket directory. You may also want to remove the configuration for that: + +```console +sudo rm -f /etc/tmpfiles.d/nix-daemon.conf +``` + Remove files created by Nix: ```console @@ -103,16 +125,6 @@ done sudo groupdel 30000 ``` -If you are on Linux with systemd, remove the Nix daemon service: - -```console -sudo systemctl stop nix-daemon.socket -sudo systemctl stop nix-daemon.service -sudo systemctl disable nix-daemon.socket -sudo systemctl disable nix-daemon.service -sudo systemctl daemon-reload -``` - There may also be references to Nix in - `/etc/profile` From 4d55acf5154639cd1a54435ace28cd497b5a9eb8 Mon Sep 17 00:00:00 2001 From: Liu Xiaoyi Date: Mon, 21 Nov 2022 13:46:22 +0800 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Sandro --- doc/manual/src/installation/installing-binary.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/doc/manual/src/installation/installing-binary.md b/doc/manual/src/installation/installing-binary.md index 1b7db59cd..8cdd64df6 100644 --- a/doc/manual/src/installation/installing-binary.md +++ b/doc/manual/src/installation/installing-binary.md @@ -91,23 +91,21 @@ extension. The installer will also create `/etc/profile.d/nix.sh`. To begin, if you are on Linux with systemd, remove the Nix daemon service: ```console -sudo systemctl stop nix-daemon.socket sudo systemctl stop nix-daemon.service -sudo systemctl disable nix-daemon.socket -sudo systemctl disable nix-daemon.service +sudo systemctl disable nix-daemon.socket nix-daemon.service sudo systemctl daemon-reload ``` Then you can remove systemd service files: ```console -sudo rm -f /etc/systemd/system/nix-daemon.service /etc/systemd/system/nix-daemon.socket +sudo rm /etc/systemd/system/nix-daemon.service /etc/systemd/system/nix-daemon.socket ``` Also, the installer script uses systemd-tmpfiles (if presents) to create the socket directory. You may also want to remove the configuration for that: ```console -sudo rm -f /etc/tmpfiles.d/nix-daemon.conf +sudo rm /etc/tmpfiles.d/nix-daemon.conf ``` Remove files created by Nix: From c4ce89f772d85e2a39727927903ca105a8c6a168 Mon Sep 17 00:00:00 2001 From: Liu Xiaoyi Date: Sat, 26 Nov 2022 22:01:51 +0800 Subject: [PATCH 3/3] Clarify uninstallation steps on Linux Co-authored-by: Valentin Gagarin --- .../src/installation/installing-binary.md | 31 ++++++++++--------- 1 file changed, 17 insertions(+), 14 deletions(-) diff --git a/doc/manual/src/installation/installing-binary.md b/doc/manual/src/installation/installing-binary.md index 8cdd64df6..a9378681d 100644 --- a/doc/manual/src/installation/installing-binary.md +++ b/doc/manual/src/installation/installing-binary.md @@ -88,25 +88,28 @@ extension. The installer will also create `/etc/profile.d/nix.sh`. ### Linux -To begin, if you are on Linux with systemd, remove the Nix daemon service: +If you are on Linux with systemd: -```console -sudo systemctl stop nix-daemon.service -sudo systemctl disable nix-daemon.socket nix-daemon.service -sudo systemctl daemon-reload -``` +1. Remove the Nix daemon service: -Then you can remove systemd service files: + ```console + sudo systemctl stop nix-daemon.service + sudo systemctl disable nix-daemon.socket nix-daemon.service + sudo systemctl daemon-reload + ``` -```console -sudo rm /etc/systemd/system/nix-daemon.service /etc/systemd/system/nix-daemon.socket -``` +1. Remove systemd service files: -Also, the installer script uses systemd-tmpfiles (if presents) to create the socket directory. You may also want to remove the configuration for that: + ```console + sudo rm /etc/systemd/system/nix-daemon.service /etc/systemd/system/nix-daemon.socket + ``` -```console -sudo rm /etc/tmpfiles.d/nix-daemon.conf -``` +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: