mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
uninstaller: remove /run
symlink
This commit is contained in:
parent
158198a6e3
commit
84ad3a2d7e
1 changed files with 12 additions and 1 deletions
|
@ -63,10 +63,21 @@ stdenv.mkDerivation {
|
|||
|
||||
${uninstallSystem.system}/sw/bin/darwin-rebuild activate
|
||||
|
||||
if test -L /run/current-system; then
|
||||
if [[ -L /run/current-system ]]; then
|
||||
sudo rm /run/current-system
|
||||
fi
|
||||
|
||||
if [[ -L /run ]]; then
|
||||
if [[ -e /etc/synthetic.conf ]]; then
|
||||
sudo sed -i -E '/^run[[:space:]]/d' /etc/synthetic.conf
|
||||
sudo /System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util -B &>/dev/null || true
|
||||
sudo /System/Library/Filesystems/apfs.fs/Contents/Resources/apfs.util -t &>/dev/null || true
|
||||
echo >&2 "NOTE: the /run symlink will be removed on reboot"
|
||||
else
|
||||
sudo rm /run
|
||||
fi
|
||||
fi
|
||||
|
||||
echo >&2
|
||||
echo >&2 "NOTE: The /nix/var/nix/profiles/system* profiles still exist and won't be garbage collected."
|
||||
echo >&2
|
||||
|
|
Loading…
Reference in a new issue