Linux source code to uninstall

Normal compile and install / uninstall

Source installation generally consists of three steps:

  • Configuration ( configure)
  • Compile ( make)
  • Installation ( make install).

configureFile is an executable script file, it has a lot of options, use the command in the source directory to be installed ./configure –helpcan output a detailed list of options.

Where --prefixoption is to configure the installation directory, if you do not configure this option after the installation executable file in the default /usr /local/binlibrary file in the default /usr/local/lib,

The default configuration file in /usr/local/etcother resource files are placed /usr /local/share, messy.

If configured --prefix, such as:

  ./configure --prefix=/usr/local/test

All resource files will be placed in the installation /usr/local/testdirectory, it will not divert to another directory.

Use --prefixAnother benefit is the convenient option to uninstall the software or the software migration

  • When a software installation is no longer required, just simply delete the installation directory, you can uninstall the software and clean;
  • Transplantation software only needs to copy the entire directory to (under the same operating system) to another machine

Of course you want to uninstall the program, also in the original makewith a directory make uninstall, but only if the Makefilefile has uninstallcommand.

 

About uninstalling

If no --prefixoption, did not provide source package make uninstall, it can be a complete uninstall in the following ways:

A temporary directory reinstall it again, such as:

  ./configure --prefix=/tmp/to_remove && make install

Then traverse the /tmp/to_removedocument, such as the vim / bin / vimdiff => find / usr / -name vimdiff

Delete the corresponding files to the installation location (as /tmp/to_removein the directory structure is not configured --prefixdirectory structure when the option).

 

reference: 

Linux Corporation

Guess you like

Origin www.cnblogs.com/yusq77/p/12122061.html