OS: Ubuntu 18.04
I wanted to install vim from source, using checkinstall. So I ran this:
$ git clone https://github.com/vim/vim.git
$ cd vim/src
Here, I edited the Makefile so vim would be installed in the $HOME directory, instead of the default location that requires sudo privileges (I do have sudo privileges, but wanted to install vim locally). I also edited some other lines, like uncommenting the Python lines, or choosing the normal size of vim; but I think those are not too relevant to this post. I then ran:
$ make
$ checkinstall
Notice that I ran checkinstall without sudo. When checkinstall was done "installing", I got the following result:
Building file list...OK
Building Debian package...OK
Installing Debian package... FAILED!
However, I can now use vim in the command line and $ vim --version returns the corresponding lines, including compiled <date-of-today>. And $ which vim returns:
/path/to/home/bin/vim
I now want to uninstall vim and just install it using apt-get, even though it will install it globally.
So, what is the right way to uninstall vim in this case?
Also, other than building a deb package, what are the steps or actions that checkinstall does but make install does not?
Edit:
When checkinstall asked "Do you want to see the log file?", I typed y and the output was something like (I don remember it exactly): dpkg error: sudo privileges are required.
Later on, trying my luck (coincidentally one of the answers to this post suggested the same), I ran:
$ make uninstall
That successfully (as far as I can tell) uninstalled vim and removed the vim files from my $HOME directory. I then ran:
$ sudo apt-get install vim-gtk3
because I wanted to install a version with xterm_clipboard enabled. Then, as requested in a comment here (I read the comment after I installed vim-gtk3), I ran some commands, and the results were:
$ type -a vim
vim is /usr/bin/vim
$ dpkg -S /usr/bin/vim
dpkg-query: no path found matching pattern /usr/bin/vim