It’s embarrassing that I could not remember how I installed dbeaver package. Then I find dbeaver exists in my personal local file system.
/nix/store/vss624qx54x7sw9msllhrz6cp1mqbg72-nixpkgs-21.11pre312229.08ef0f28e3a/nixpkgs/pkgs/applications/misc/dbeaver
So I try to remove that package.
First I use the command nix-store -q dbeaver
, and it returns error: getting status of '/home/john/Downloads/dbeaver': No such file or directory
.
Then I search on the internet, checking the installed packages by nix-env --query --installed
, which merely returns nix-2.3.15
.
Next I try nix-env --uninstall dbeaver
under $HOME dir. The command returns
building '/nix/store/dyqh3ka26zbf004h0gw8wv3vfz9nrwf8-user-environment.drv'...
created 6 symlinks in user environment
But then searching with the command sudo find / -name dbeaver
. nix replies
/nix/store/vss624qx54x7sw9msllhrz6cp1mqbg72-nixpkgs-21.11pre312229.08ef0f28e3a/nixpkgs/pkgs/applications/misc/dbeaver
The package(?) is still there. In the end I switch to the directory cd /nix/store/vss624qx54x7sw9msllhrz6cp1mqbg72-nixpkgs-21.11pre312229.08ef0f28e3a/nixpkgs/pkgs/applications/misc/
In that directory I execute following command (and below that is the returned message, and eventually the package dbeaver looks like removed.
$ nix-store --delete --ignore-liveness dbeaver
finding garbage collector roots...
removing stale temporary roots file '/nix/var/nix/temproots/33487'
removing stale temporary roots file '/nix/var/nix/temproots/33952'
removing stale temporary roots file '/nix/var/nix/temproots/34191'
deleting '/nix/store/247xhz7m9nbd13q8fmr7qn9rf22rrixc-user-environment.drv'
deleting '/nix/store/nbl19hcn4hdspvg98akxf6xrl6k5wgx3-user-environment'
deleting '/nix/store/kvm5sxi48m164b1s94zdd7jg3navdg9x-env-manifest.nix'
deleting '/nix/store/vss624qx54x7sw9msllhrz6cp1mqbg72-nixpkgs-21.11pre312229.08ef0f28e3a'
deleting '/nix/store/trash'
deleting unused links...
note: currently hard linking saves -0.00 MiB
4 store paths deleted, 88.93 MiB freed
My question. Why do I have to switch to /nix/store/vss624qx54x7sw9msllhrz6cp1mqbg72-nixpkgs-21.11pre312229.08ef0f28e3a/nixpkgs/pkgs/applications/misc/
for removing the installed package? Thanks