mirror of
https://github.com/netdata/netdata.git
synced 2025-04-02 20:48:06 +00:00
Update uninstallation docs and remove reinstallation page (#18907)
Co-authored-by: ilyam8 <ilya@netdata.cloud>
This commit is contained in:
parent
8a7f454ff7
commit
55aaa2e856
3 changed files with 43 additions and 112 deletions
docs/category-overview-pages
packaging/installer
|
@ -1,8 +1,7 @@
|
|||
# Maintenance operations on Netdata Agents Overview
|
||||
# Netdata Agent Maintenance Operations Overview
|
||||
|
||||
This section provides information on various actions you can take while maintaining a Netdata Agent.
|
||||
This section provides information on various actions to maintain a Netdata Agent:
|
||||
|
||||
- [Starting and Stopping Netdata Agents](/docs/netdata-agent/start-stop-restart.md)
|
||||
- [Update Netdata Agents](/packaging/installer/UPDATE.md)
|
||||
- [Reinstall Netdata Agents](/packaging/installer/REINSTALL.md)
|
||||
- [Uninstall Netdata Agents](/packaging/installer/UNINSTALL.md)
|
||||
- [Service Control](/docs/netdata-agent/start-stop-restart.md)
|
||||
- [Update](/packaging/installer/UPDATE.md)
|
||||
- [Uninstall](/packaging/installer/UNINSTALL.md)
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
# Reinstall Netdata
|
||||
|
||||
In certain situations, such as needing to enable a feature or troubleshoot an issue, you may need to reinstall the
|
||||
Netdata Agent on your node.
|
||||
|
||||
## One-line installer script (`kickstart.sh`)
|
||||
|
||||
### Reinstalling with the same install type
|
||||
|
||||
Run the one-line installer script with the `--reinstall` parameter to reinstall the Netdata Agent. This will preserve
|
||||
any [user configuration](/docs/netdata-agent/configuration/README.md) in `netdata.conf` or other files, and will keep the same install
|
||||
type that was used for the original install.
|
||||
|
||||
If you used any [optional
|
||||
parameters](/packaging/installer/methods/kickstart.md#optional-parameters-to-alter-your-installation) during initial
|
||||
installation, you need to pass them to the script again during reinstallation. If you cannot remember which options you
|
||||
used, read the contents of the `.environment` file and look for a `REINSTALL_OPTIONS` line. This line contains a list of
|
||||
optional parameters.
|
||||
|
||||
```bash
|
||||
wget -O /tmp/netdata-kickstart.sh https://get.netdata.cloud/kickstart.sh && sh /tmp/netdata-kickstart.sh --reinstall
|
||||
```
|
||||
|
||||
### Performing a clean reinstall
|
||||
|
||||
Run the one-line installer script with the `--reinstall-clean` parameter to perform a clean reinstall of the
|
||||
Netdata Agent. This will wipe all existing configuration and historical data, but can be useful sometimes for
|
||||
getting a badly broken installation working again. Unlike the regular `--reinstall` parameter, this may use a
|
||||
different install type than the original install used.
|
||||
|
||||
If you used any [optional
|
||||
parameters](/packaging/installer/methods/kickstart.md#optional-parameters-to-alter-your-installation) during initial
|
||||
installation, you need to pass them to the script again during reinstallation. If you cannot remember which options you
|
||||
used, read the contents of the `.environment` file and look for a `REINSTALL_OPTIONS` line. This line contains a list of
|
||||
optional parameters.
|
||||
|
||||
```bash
|
||||
wget -O /tmp/netdata-kickstart.sh https://get.netdata.cloud/kickstart.sh && sh /tmp/netdata-kickstart.sh --reinstall-clean
|
||||
```
|
||||
|
||||
### Changing the install type of an existing installation
|
||||
|
||||
The clean reinstall procedure outlined above can also be used to manually change the install type for an existing
|
||||
installation. Without any extra parameters, it will automatically pick the preferred installation type for your
|
||||
system, even if that has changed since the original install. If you want to force use of a specific install type,
|
||||
you can use the `--native-only`, `--static-only`, or `--build-only` parameter to control which install type gets
|
||||
used, just like with a new install.
|
||||
|
||||
When using the `--reinstall-clean` option to change the install type, you will need to manually preserve any
|
||||
configuration or historical data you want to keep. The following directories may need to be preserved:
|
||||
|
||||
- `/etc/netdata` (`/opt/netdata/etc/netdata` for static installs): For agent configuration.
|
||||
- `/var/lib/netdata` (`/opt/netdata/var/lib/netdata` for static installs): For claiming configuration.
|
||||
- `/var/cache/netdata` (`/opt/netdata/var/cache/netdata` for static installs): For historical data.
|
||||
|
||||
When copying these directories back after the reinstall, you may need to update file ownership by running `chown
|
||||
-R netdata:netdata` on them.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
If you still experience problems with your Netdata Agent installation after following one of these processes, the next
|
||||
best route is to [uninstall](/packaging/installer/UNINSTALL.md) and then try a fresh installation using the [one-line
|
||||
installer](/packaging/installer/methods/kickstart.md).
|
||||
|
||||
You can also post to our [community forums](https://community.netdata.cloud) or create a new [bug report](https://github.com/netdata/netdata/issues/new?assignees=&labels=bug%2Cneeds+triage&template=BUG_REPORT.yml).
|
|
@ -1,47 +1,44 @@
|
|||
# Uninstall Netdata
|
||||
|
||||
## UNIX
|
||||
|
||||
> **Note**
|
||||
>
|
||||
> If you're having trouble updating Netdata, moving from one installation method to another, or generally having
|
||||
> issues with your Netdata Agent installation, consider our [reinstalling Netdata](/packaging/installer/REINSTALL.md) instead of removing the Netdata Agent entirely.
|
||||
> This method assumes you installed Netdata using the `kickstart.sh` or `netdata-installer.sh` script.
|
||||
> If you used a different method, it might not work and could complicate the removal process.
|
||||
|
||||
The recommended method to uninstall Netdata on a system is to use our kickstart installer script with the `--uninstall` option like so:
|
||||
The recommended way to uninstall Netdata is to use the same script you used for installation. Just add the `--uninstall` flag:
|
||||
|
||||
```sh
|
||||
```bash
|
||||
wget -O /tmp/netdata-kickstart.sh https://get.netdata.cloud/kickstart.sh && sh /tmp/netdata-kickstart.sh --uninstall
|
||||
```
|
||||
|
||||
Or (if you have curl but not wget):
|
||||
<details>
|
||||
<summary>if you have curl but not wget</summary>
|
||||
|
||||
```sh
|
||||
curl https://get.netdata.cloud/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh --uninstall
|
||||
```
|
||||
|
||||
This will work in most cases without you needing to do anything more other than accepting removal of configuration
|
||||
and data files.
|
||||
</details>
|
||||
|
||||
If you used a non-standard installation prefix, you may need to specify that prefix using the `--old-install-prefix`
|
||||
option when uninstalling this way.
|
||||
|
||||
## Unofficial installs
|
||||
**What to Expect**:
|
||||
|
||||
If you used a third-party package to install Netdata, then the above method will usually not work, and you will
|
||||
need to use whatever mechanism you used to originally install Netdata to uninstall it.
|
||||
In most cases, these commands will guide you through the uninstallation process and remove configuration and data files automatically.
|
||||
|
||||
**Non-Standard Installations**:
|
||||
|
||||
If you installed Netdata with a custom prefix (different directory location), you may need to specify the original prefix during uninstallation with the `--old-install-prefix` option.
|
||||
|
||||
## Uninstalling manually
|
||||
|
||||
Most official installs of Netdata include an uninstaller script that can be manually invoked instead of using the
|
||||
kickstart script (internally, the kickstart script also uses this uninstaller script, it just handles the process
|
||||
outlined below for you).
|
||||
Most official installations of Netdata include an uninstaller script that can be manually invoked instead of using the kickstart script (internally, the kickstart script also uses this uninstaller script, it just handles the process outlined below for you).
|
||||
|
||||
This uninstaller script is self-contained other than requiring a `.environment` file that was generated during
|
||||
installation. In most cases, this will be found in `/etc/netdata/.environment`, though if you used a non-standard
|
||||
installation prefix it will usually be located in a similar place under that prefix.
|
||||
This uninstaller script is self-contained, other than requiring a `.environment` file that was generated during installation. In most cases, this will be found in `/etc/netdata/.environment`, though if you used a custom installation prefix it be located under that directory.
|
||||
|
||||
A workflow for uninstallation looks like this:
|
||||
|
||||
1. Find your `.environment` file, which is usually `/etc/netdata/.environment` in a default installation.
|
||||
2. If you cannot find that file and would like to uninstall Netdata, then create a new file with the following content:
|
||||
1. Find your `.environment` file
|
||||
2. If you can’t find that file and would like to uninstall Netdata, then create a new file with the following content:
|
||||
|
||||
```sh
|
||||
NETDATA_PREFIX="<installation prefix>" # put what you used as a parameter to shell installed `--install-prefix` flag. Otherwise it should be empty
|
||||
|
@ -50,28 +47,26 @@ A workflow for uninstallation looks like this:
|
|||
|
||||
3. Run `netdata-uninstaller.sh` as follows
|
||||
|
||||
3.1 **Interactive mode (Default)**
|
||||
- **Interactive mode (Default)**
|
||||
|
||||
The default mode in the uninstaller script is **interactive**. This means that the script provides you
|
||||
the option to reply with "yes" (`y`/`Y`) or "no" (`n`/`N`) to control the removal of each Netdata asset in
|
||||
the filesystem.
|
||||
The default mode in the uninstaller script is **interactive**. This means that the script provides you the option to reply with "yes" (`y`/`Y`) or "no" (`n`/`N`) to control the removal of each Netdata asset in the filesystem.
|
||||
|
||||
```sh
|
||||
${NETDATA_PREFIX}/usr/libexec/netdata/netdata-uninstaller.sh --yes --env <environment_file>
|
||||
```
|
||||
```sh
|
||||
${NETDATA_PREFIX}/usr/libexec/netdata/netdata-uninstaller.sh --yes --env <environment_file>
|
||||
```
|
||||
|
||||
3.2 **Non-interactive mode**
|
||||
- **Non-interactive mode**
|
||||
|
||||
If you are sure and you know what you are doing, you can speed up the removal of the Netdata assets from the
|
||||
filesystem without any questions by using the force option (`-f`/`--force`). This option will remove all the
|
||||
Netdata assets in a **non-interactive** mode.
|
||||
If you’re sure, and you know what you’re doing, you can speed up the removal of the Netdata assets from the filesystem without any questions by using the force option (`-f`/`--force`). This option will remove all the
|
||||
Netdata assets in a **non-interactive** mode.
|
||||
|
||||
```sh
|
||||
${NETDATA_PREFIX}/usr/libexec/netdata/netdata-uninstaller.sh --yes --force --env <environment_file>
|
||||
```
|
||||
```sh
|
||||
${NETDATA_PREFIX}/usr/libexec/netdata/netdata-uninstaller.sh --yes --force --env <environment_file>
|
||||
```
|
||||
|
||||
Note: Existing installations may still need to download the file if it's not present. To execute uninstall in that case,
|
||||
run the following commands:
|
||||
> **Note**
|
||||
>
|
||||
> Existing installations may still need to download the file if it's not present. To execute the uninstaller in that case, run the following commands:
|
||||
|
||||
```sh
|
||||
wget https://raw.githubusercontent.com/netdata/netdata/master/packaging/installer/netdata-uninstaller.sh
|
||||
|
@ -79,7 +74,9 @@ chmod +x ./netdata-uninstaller.sh
|
|||
./netdata-uninstaller.sh --yes --env <environment_file>
|
||||
```
|
||||
|
||||
The default `environment_file` is `/etc/netdata/.environment`.
|
||||
## Windows
|
||||
|
||||
> Note: This uninstallation method assumes previous installation with `netdata-installer.sh` or the kickstart script.
|
||||
> Using it when Netdata was installed in some other way will usually not work correctly, and may make it harder to uninstall Netdata.
|
||||
Currently, the Windows version of Netdata is in beta. To uninstall Netdata on Windows:
|
||||
|
||||
1. Locate the `Uninstall.exe` file in your Netdata installation directory.
|
||||
2. Double-click the `Uninstall.exe` file and follow the on-screen instructions.
|
||||
|
|
Loading…
Add table
Reference in a new issue