Difference between revisions of "Uninstall Gnucash Ubuntu"
m (→Installed using apt or from Debian package files) |
(Moved to gneric Uninstall Gnucash Linux page as part of rework) |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Delete}} | ||
== Uninstall from Build of GnuCash from sources == | == Uninstall from Build of GnuCash from sources == | ||
− | To uninstall successfully you need to retain | + | === Built using CMake and Make or Ninja === |
+ | To uninstall successfully you need to retain both the build directory from which you installed GnuCash and the source directory. This is because the uninstall process runs a check on the build environment which checks the source files. If you did not retain the build directory and/or the source directory, you could try downloading the same version of the sources as you have installedagain, create a new build directory and rebuild the application using the cmake and make commands you originally used to build and install. This will recreate the install_manifest.txt file in the top level of the build file and allow the check on the build environment to run successfully. If you have duplicated the original then you should be able to remove the installation in the normal manner given below. | ||
+ | If you built the program with '''make''': | ||
<SyntaxHighlight lang="sh"> | <SyntaxHighlight lang="sh"> | ||
− | cd <build-directory> # | + | cd <build-directory> # either the original build directory or the rebuilt version as above. |
make uninstall # prefix with sudo if installed in /usr/local or /opt or another location requiring admin privileges. | make uninstall # prefix with sudo if installed in /usr/local or /opt or another location requiring admin privileges. | ||
</SyntaxHighlight> | </SyntaxHighlight> | ||
− | == Uninstall if Distribution Version == | + | If you built the program with '''ninja''': |
+ | <SyntaxHighlight lang="sh"> | ||
+ | cd <build-directory> # either the original build directory or the rebuilt version as above. | ||
+ | ninja uninstall # prefix with sudo if installed in /usr/local or /opt or another location requiring admin privileges. | ||
+ | </SyntaxHighlight> | ||
+ | |||
+ | === Built using autotools === | ||
+ | Builds with autotools are generally done in source, i.e. without a separate build directory. From late 2016 using a build directory which was not in the root became possible. | ||
+ | *If a build directory exists cd to it in a shell. | ||
+ | *If no build directory exists cd to the root source directory (e.g. gnucash-3.<x>). | ||
+ | *Enter make uninstall (prefix with sudo if the installation was to a system directory (/usr/local or /opt)). | ||
+ | == Uninstall if Installed As a Distribution Version == | ||
=== Installed from Software Manager === | === Installed from Software Manager === | ||
*Open the Software Manager | *Open the Software Manager | ||
Line 12: | Line 26: | ||
*Click on the remove button | *Click on the remove button | ||
=== Installed using apt package files === | === Installed using apt package files === | ||
− | In a terminal | + | In a terminal enter |
<SyntaxHighlight lang="sh"> | <SyntaxHighlight lang="sh"> | ||
sudo apt-get remove gnucash # using the --purge switch with apt-get will also remove any associated user preference files. | sudo apt-get remove gnucash # using the --purge switch with apt-get will also remove any associated user preference files. | ||
</SyntaxHighlight> | </SyntaxHighlight> | ||
− | + | === Installed from a debian package === | |
+ | In a terminal enter | ||
+ | <SyntaxHighlight lang="sh"> | ||
+ | sudo dpkg --remove gnucash # using the --purge switch with dpkg will also remove any associated user preference files. | ||
+ | </SyntaxHighlight> | ||
== Uninstall manually == | == Uninstall manually == | ||
− | If all else fails you | + | If all else fails you can uninstall the program components manually. When you installed you will have used CMAKE_INSTALL_PREFIX (or a similar prefix in config, if you used autotools) to set the location to which you installed GnuCash, commonly one of |
*$HOME/.local | *$HOME/.local | ||
*/usr/local | */usr/local | ||
*/opt | */opt | ||
+ | or similar. | ||
+ | |||
You can locate where gnucash is installed by using the following command in a terminal: | You can locate where gnucash is installed by using the following command in a terminal: | ||
<SyntaxHighlight lang="sh"> | <SyntaxHighlight lang="sh"> | ||
Line 30: | Line 50: | ||
gnucash: /usr/local/bin/gnucash /usr/local/etc/gnucash /usr/local/lib/gnucash | gnucash: /usr/local/bin/gnucash /usr/local/etc/gnucash /usr/local/lib/gnucash | ||
</SyntaxHighlight> | </SyntaxHighlight> | ||
− | when GnuCash was installed with CMAKE_INSTALL_PREFIX=/usr/local. There will also be help files in /usr/local/share/gnucash. | + | when GnuCash was installed with CMAKE_INSTALL_PREFIX=/usr/local. There will also be help files in /usr/local/share/gnucash and /usr/local/lib will also contain library files of the form libgnc-<xxxxx>.s0 which should also be removed. |
+ | |||
+ | The whereis command return will be similar if you used another install prefix with that prefix substituted for /usr/local. | ||
− | + | You will have to remove GnuCash related files from these locations as follows (precede the rm command with sudo if <prefix> is /usr/local, /opt or another system folder. | |
− | + | Substitute for <prefix> the location you identified with whereis above. | |
− | <span style="color: red;">CAUTION Performing the following commands using sudo on system directories/folders will give you admin/root privileges. Removing the wrong files could potentially damage your system. Do not use unless you are confident about working with system files and fully understand the possible consequences. Check the commands carefully before hitting return.</span> | + | <span style="color: red;">'''CAUTION:-''' Performing the following commands using sudo on system directories/folders will give you admin/root privileges. Removing the wrong files could potentially damage your system. Do not use unless you are confident about working with system files and fully understand the possible consequences. Check the commands carefully before hitting return.</span> |
<SyntaxHighlight lang="sh"> | <SyntaxHighlight lang="sh"> | ||
Line 42: | Line 64: | ||
rm -r <prefix>/etc/gnucash # this is a folder containing GnuCash configuration information | rm -r <prefix>/etc/gnucash # this is a folder containing GnuCash configuration information | ||
rm -r <prefix>/lib/gnucash # this folder contains gnucash libraries | rm -r <prefix>/lib/gnucash # this folder contains gnucash libraries | ||
− | rm <prefix>/lib/libgnc-*.so # these are | + | rm <prefix>/lib/libgnc-*.so # these are specific GnuCash associated library files |
rm -r <prefix>/share/gnucash # these are the Gnucash internal help files | rm -r <prefix>/share/gnucash # these are the Gnucash internal help files | ||
</SyntaxHighlight> | </SyntaxHighlight> |
Latest revision as of 04:58, 28 September 2018
Contents
Uninstall from Build of GnuCash from sources
Built using CMake and Make or Ninja
To uninstall successfully you need to retain both the build directory from which you installed GnuCash and the source directory. This is because the uninstall process runs a check on the build environment which checks the source files. If you did not retain the build directory and/or the source directory, you could try downloading the same version of the sources as you have installedagain, create a new build directory and rebuild the application using the cmake and make commands you originally used to build and install. This will recreate the install_manifest.txt file in the top level of the build file and allow the check on the build environment to run successfully. If you have duplicated the original then you should be able to remove the installation in the normal manner given below. If you built the program with make:
cd <build-directory> # either the original build directory or the rebuilt version as above.
make uninstall # prefix with sudo if installed in /usr/local or /opt or another location requiring admin privileges.
If you built the program with ninja:
cd <build-directory> # either the original build directory or the rebuilt version as above.
ninja uninstall # prefix with sudo if installed in /usr/local or /opt or another location requiring admin privileges.
Built using autotools
Builds with autotools are generally done in source, i.e. without a separate build directory. From late 2016 using a build directory which was not in the root became possible.
- If a build directory exists cd to it in a shell.
- If no build directory exists cd to the root source directory (e.g. gnucash-3.<x>).
- Enter make uninstall (prefix with sudo if the installation was to a system directory (/usr/local or /opt)).
Uninstall if Installed As a Distribution Version
Installed from Software Manager
- Open the Software Manager
- Locate the installed package using search
- the package page, if it is installed a remove button will be on the page
- Click on the remove button
Installed using apt package files
In a terminal enter
sudo apt-get remove gnucash # using the --purge switch with apt-get will also remove any associated user preference files.
Installed from a debian package
In a terminal enter
sudo dpkg --remove gnucash # using the --purge switch with dpkg will also remove any associated user preference files.
Uninstall manually
If all else fails you can uninstall the program components manually. When you installed you will have used CMAKE_INSTALL_PREFIX (or a similar prefix in config, if you used autotools) to set the location to which you installed GnuCash, commonly one of
- $HOME/.local
- /usr/local
- /opt
or similar.
You can locate where gnucash is installed by using the following command in a terminal:
whereis gnucash
this will return for example
gnucash: /usr/local/bin/gnucash /usr/local/etc/gnucash /usr/local/lib/gnucash
when GnuCash was installed with CMAKE_INSTALL_PREFIX=/usr/local. There will also be help files in /usr/local/share/gnucash and /usr/local/lib will also contain library files of the form libgnc-<xxxxx>.s0 which should also be removed.
The whereis command return will be similar if you used another install prefix with that prefix substituted for /usr/local.
You will have to remove GnuCash related files from these locations as follows (precede the rm command with sudo if <prefix> is /usr/local, /opt or another system folder.
Substitute for <prefix> the location you identified with whereis above.
CAUTION:- Performing the following commands using sudo on system directories/folders will give you admin/root privileges. Removing the wrong files could potentially damage your system. Do not use unless you are confident about working with system files and fully understand the possible consequences. Check the commands carefully before hitting return.
rm <prefix>/bin/gnucash # this is the gnucash executable
rm -r <prefix>/etc/gnucash # this is a folder containing GnuCash configuration information
rm -r <prefix>/lib/gnucash # this folder contains gnucash libraries
rm <prefix>/lib/libgnc-*.so # these are specific GnuCash associated library files
rm -r <prefix>/share/gnucash # these are the Gnucash internal help files