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:


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?

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
  • What's the output of $ type -a vim? For each path in the output, what's the output of $ dpkg -S <path>? Try to reinstall with checkinstall, exactly like you did initially; when the failure occur, the script should ask you whether you want to view a log file (Do you want to see the log file?); answer yes (press y): what does the log file tell you?
    – user938271
    Jul 5, 2019 at 16:09
  • @user938271 , thanks for the interest. I edited my post replying to your questions. I read your comment a little too late, so the responses might not be exactly what you asked for, but I hope they can help.
    – evaristegd
    Jul 5, 2019 at 16:41
  • I could be wrong, but I think you did fine. checkinstall was able to generate a .deb, but was not able to install it, because installing a package on your system requires sudo (even if your binary is in your home), and you did not. You've then run $ make uninstall which must have removed most if not all the installed files. The benefit of checkinstall is that it generates a .deb package, which can be handled by dpkg and apt-get, like any package installed from your default repositories.
    – user938271
    Jul 5, 2019 at 17:25
  • 1
    See the wiki for more info: help.ubuntu.com/community/CheckInstall Using checkinstall can be quite tricky though, because you have to give it several options for it to work as expected. As an example, this is how I would install vim 8.1.1635: $ sudo checkinstall --pkgname vim --pkgversion 9:8.1.1635 --spec /dev/null --backup=no -y.
    – user938271
    Jul 5, 2019 at 17:25
  • 1
    Sure, I will if that helps. But not now, because it would take some time to write a complete answer. I'll try to do it in the next few days.
    – user938271
    Jul 5, 2019 at 23:20

1 Answer 1


You didn't read man checkinstall and didn't save any data from it.

To uninstall software that was installed via make, thusly:

cd vim/src
make uninstall
  • Thanks for the reply. How do I "save data from it"?
    – evaristegd
    Jul 5, 2019 at 16:26
  • By reading man checkinstall
    – waltinator
    Jul 5, 2019 at 17:41
  • The tone used in this answer is not great. It's also slightly misleading because the manpage doesn't spell this out explicitly. In fact, at the time of writing, the output from checkinstall says, "You can remove it from your system anytime using: dpkg -r vim". Jan 26, 2022 at 19:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .