Uninstallation Options - akeeba/onthos GitHub Wiki
Uninstallation options
Onthos provides four levels of uninstallation forcefulness for removing extensions from your site.
Uninstall
This method uses Joomla's default uninstallation code.
An extension may fail to uninstall in the following cases:
- It is Protected.
- Its installation script file tells Joomla to abort the uninstallation.
- Its installation script file is causing PHP errors e.g. because it's written for an old PHP or Joomla! version.
- Its XML manifest file is missing.
- It extension belongs to a package which has
<blockChildUninstall>1</blockChildUninstall>
in its XML manifest thereby telling Joomla! that you have to uninstall the package, not the individual extensions separately. - The database tables installed by the extension could not be removed.
Unprotect and Uninstall
Before uninstalling the extension, Onthos will:
- Remove the extension's Protection.
- Remove the extension's Lock.
- Remove the
<blockChildUninstall>1</blockChildUninstall>
line of a package extension, or the extension's parent package.
Then, it will run Joomla's default uninstallation code.
An extension may fail to uninstall in the following cases:
- Its installation script file tells Joomla to abort the uninstallation.
- Its installation script file is causing PHP errors e.g. because it's written for an old PHP or Joomla! version.
- Its XML manifest file is missing.
- The database tables installed by the extension could not be removed.
Remove Script and Uninstall
Before uninstalling the extension, Onthos will:
- Remove the extension's installation script.
- Remove the extension's Protection.
- Remove the extension's Lock.
- Remove the
<blockChildUninstall>1</blockChildUninstall>
line of a package extension, or the extension's parent package.
Then, it will run Joomla's default uninstallation code.
- Its XML manifest file is missing.
- The database tables installed by the extension could not be removed.
Forced Uninstall
🚨 This is a potentially dangerous method. Only use for ghost database records for extensions which no longer exist, extensions with broken / missing XML manifest files, or as your last resort in any other case.
This uninstallation method completely bypasses Joomla!. It will uninstall the extension. Due to its nature, it might have unintended consequences. Do take a backup before using it, just in case.
Under the hood it does the following:
- If the extension is a package, it runs Forced Uninstall on all of the package's contained extensions which are currently installed on the site. 🚨 If you are Force Uninstalling a discovered, but not yet installed, package it WILL uninstall any of its contained extensions which might already be installed on the site.
- Removes the tables installed by the extension. 🚨 This is based on the CREATE TABLE statements the extension uses in its XML manifest. This might delete MORE tables than you'd hope for. For our extensions, it will remove the
#__akeeba_common
table which may break all of our other extensions. - Removes the extension's media folder, if one exists.
- Removes the extension's language files
- Removes the extension's files and folders (where its code lives)
- Removes the extension's installation script
- Removes the extension's XML manifest
- If the extension is a module:
- Removes any module instances
- If the extension is a component:
- Removes the extension's field groups, and the extension's fields and their values
- Removes the extension's categories
- Removes the extension's backend (Components) menu records
- Removes any frontend menu records referring to the extension
- Removes the
#__assets
entry for the extension
- Removes the extension's database record from the
#__extensions
table.