0

To completely remove it I ran sudo apt-get purge --auto-remove nvim but then when I run nvim It runs.

Then I removed it from my .config, .cache and .local, and again ran ```nvim``, it still runs.

So i checked whereis nvim and it shows nvim: /usr/local/bin/nvim /usr/local/lib/nvim. So I went to /usr/local/bin/ and tried to rm -rf nvim but it said permision denied.

Now I thought I'd do sudo rm -rf, but decided to consult people here, is that the right way of doing it or what else should I do.

Lucifer
  • 3
  • 2
  • How did you install neovim to begin with? Compile from source? – Thomas Ward Jul 14 '25 at 04:49
  • What package (and who packaged it) really matters; if you're using amd64 (you don't specify) and are using the Ubuntu noble repository; the files installed are shown at https://packages.ubuntu.com/noble/amd64/neovim/filelist but if you installed it from elsewhere, those results may not match your installed system. You usually do not need to manually delete each file (in fact I'd recommend you don't do that) Note your found location does NOT match the Ubuntu package... – guiverc Jul 14 '25 at 04:52
  • No I want to do that now, I installed with sudo apt install neovim – Lucifer Jul 14 '25 at 04:52
  • We cannot know where neovim will come from IF you've added an extra source to your system, usually I'd do an apt policy neovim to explore where its available ... but what you'll have available will of course include whatever sources you've added to your system (and apt policy is limited to sources you've added; if you manually install a package it won't have a source to list) – guiverc Jul 14 '25 at 04:54
  • Installed: (none) Candidate: 0.9.5-6ubuntu2 Version table: 0.9.5-6ubuntu2 500 500 http://archive.ubuntu.com/ubuntu noble/universe amd64 Packages``` Ok so it looks like from the Ubuntu noble repository, but then it also says installation: none, what does that mean. Please bear with me, I'm pretty new to linux and nvim and am currently using a WSL2 for practice – Lucifer Jul 14 '25 at 04:57
  • This is not a forum, but a Question and Answer site. Comments are intended to be from readers to the OP (original poster) who replies via amending their question (ie. adding or clarifying details in the question itself) as the Question is what is answered. Your question says usr/local/bin/nvim which is NOT from the Ubuntu package ... so you've likely installed it another way as well possibly... We're limited to details you provide (and in your question is where it matters on a Q&A site!!) – guiverc Jul 14 '25 at 05:31
  • Sorry, my bad, I did compile from source after deleting it the first time, and I thought it was running the previous installation, which is why I removed the neovim directory from my home. If so does this mean this is the one I've compiled from source. if so, should I do sudo rm -rf /usr/local/bin/nvim then. Again, I'm sorry for not providing enough details, and thank you for helping. – Lucifer Jul 14 '25 at 05:54

1 Answers1

2

You clearly installed neovim in an inofficial way. This can be suspected because the binary is (correctly) located in /usr/local/bin.

Manually installed software "overrides" a similarly named executable installed using the software center ("Apt system"). Thus, installing or removing the distribution-supplied version of neovim does not make a difference on your system: you continue to run the version installed in /usr/local/bin.

You installed it, so only you can know how you installed it. Depending on how you installed it, a removal script may or may not have been supplied, which would have been the preferred way to remove that installation.

However, lacking this, your remaining option is to manually remove anything related to nvim in /usr/local/bin/ and /usr/local/lib/. The problem remains that it can be difficult to know which files came with that installation: other files, not named neovim may have been part of that installation.

Obviously, since this concerns system directories, you need root permissions to delete these files, and be extremely careful about what you are doing. Prefer to use the software center or apt to install software if you are not too comfortable with a Linux system.

vanadium
  • 98,427