Uninstall Gnucash Ubuntu
Contents
Uninstall from Build of GnuCash from sources
Built using CMake
To uninstall successfully you need to retain at least the build directory from which you installed GnuCash. If you did not retain the build directory you could try downloading the sources for the same version again, 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. If you have duplicated the original then you should be able to remove the installation in the normal manner below.
cd <build-directory> # <build-directory> is the original build file from which you installed GnuCash.
make 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 prefic in config if you used autotools) to set the location to which you installed GnuCash, commonly one of
- $HOME/.local
- /usr/local
- /opt
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 wil;l also contain library files of the form libgnc-<xxxxx>.s0 which should also be removed.
The 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 specificGnuCash associated library files
rm -r <prefix>/share/gnucash # these are the Gnucash internal help files