Docs » Get started with the Splunk Distribution of the OpenTelemetry Collector » Get started with the Collector for Linux » Uninstall the Collector for Linux

Uninstall the Collector for Linux 🔗

Follow these instructions to uninstall the Splunk Distribution of the OpenTelemetry Collector for Linux.

You can use commands to uninstall the Collector and Fluentd packages if you used the installer script or Debian or RPM package to perform the installation.

If you installed the Collector and Fluentd using other methods (such as Ansible, Puppet, and Heroku as described in Install the Collector for Linux with the installer script), follow uninstall instructions specific to the tool you used.

Understand which files are deleted by the uninstall 🔗

The uninstall commands covered here don’t delete all of the files installed and created by the installer. Likewise, the uninstall commands don’t delete all of the files generated by the Collector and Fluent services as they ran after installation. Typically, it’s safe to just keep the files that aren’t deleted by the uninstall.

While not an exhaustive list, here are key notes about some of the files that are or are not deleted when you use the installer script or a package manager command to perform the uninstall:

  • The /tmp/splunk-otel-collector.sh installer script isn’t deleted. You can delete the script if you don’t need to run it again.

  • The /etc/otel/collector/splunk-otel-collector.conf file isn’t deleted. If you modified /etc/otel/collector/splunk-otel-collector.conf and want to keep the information in the file, be sure to back it up before re-running the installer script. The installer script recreates /etc/otel/collector/splunk-otel-collector.conf each time you run it, overwriting any existing /etc/otel/collector/splunk-otel-collector.conf.

  • On Debian-based systems, the following files are deleted. If you want to keep these files, be sure to back up the individual files or the entire /etc/otel/collector directory before you perform the uninstall. Files not in this list aren’t deleted.

    • /etc/otel/collector/agent_config.yaml

    • /etc/otel/collector/fluentd/README

    • /etc/otel/collector/fluentd/conf.d/apache.conf

    • /etc/otel/collector/fluentd/conf.d/cassandra.conf

    • /etc/otel/collector/fluentd/conf.d/docker.conf

    • /etc/otel/collector/fluentd/conf.d/etcd.conf

    • /etc/otel/collector/fluentd/conf.d/jetty.conf

    • /etc/otel/collector/fluentd/conf.d/journald.conf

    • /etc/otel/collector/fluentd/conf.d/memcached.conf

    • /etc/otel/collector/fluentd/conf.d/mongodb.conf

    • /etc/otel/collector/fluentd/conf.d/mysql.conf

    • /etc/otel/collector/fluentd/conf.d/nginx.conf

    • /etc/otel/collector/fluentd/conf.d/postgresql.conf

    • /etc/otel/collector/fluentd/conf.d/rabbitmq.conf

    • /etc/otel/collector/fluentd/conf.d/redis.conf

    • /etc/otel/collector/fluentd/conf.d/syslog.conf

    • /etc/otel/collector/fluentd/conf.d/tomcat.conf

    • /etc/otel/collector/fluentd/conf.d/zookeeper.conf

    • /etc/otel/collector/fluentd/fluent.conf

    • /etc/otel/collector/fluentd/splunk-otel-collector.conf

    • /etc/otel/collector/gateway_config.yaml

    • /etc/otel/collector/splunk-otel-collector.conf.example

    • /etc/otel/collector/splunk-support-bundle.sh

  • On RPM-based systems, if you modified any of the following files, the modified files aren’t deleted and are renamed with the .rpmsave extension. For example, the uninstall process renames a modified agent_config.yaml to agent_config.yaml.rpmsave. You can delete these .rpmsave files if you don’t need them. Unmodified files in this list are deleted. Files not in this list aren’t deleted.

    • /etc/otel/collector/agent_config.yaml

    • /etc/otel/collector/fluentd/README

    • /etc/otel/collector/fluentd/conf.d/apache.conf

    • /etc/otel/collector/fluentd/conf.d/cassandra.conf

    • /etc/otel/collector/fluentd/conf.d/docker.conf

    • /etc/otel/collector/fluentd/conf.d/etcd.conf

    • /etc/otel/collector/fluentd/conf.d/jetty.conf

    • /etc/otel/collector/fluentd/conf.d/journald.conf

    • /etc/otel/collector/fluentd/conf.d/memcached.conf

    • /etc/otel/collector/fluentd/conf.d/mongodb.conf

    • /etc/otel/collector/fluentd/conf.d/mysql.conf

    • /etc/otel/collector/fluentd/conf.d/nginx.conf

    • /etc/otel/collector/fluentd/conf.d/postgresql.conf

    • /etc/otel/collector/fluentd/conf.d/rabbitmq.conf

    • /etc/otel/collector/fluentd/conf.d/redis.conf

    • /etc/otel/collector/fluentd/conf.d/syslog.conf

    • /etc/otel/collector/fluentd/conf.d/tomcat.conf

    • /etc/otel/collector/fluentd/conf.d/zookeeper.conf

    • /etc/otel/collector/fluentd/fluent.conf

    • /etc/otel/collector/fluentd/splunk-otel-collector.conf

    • /etc/otel/collector/gateway_config.yaml

    • /etc/otel/collector/splunk-otel-collector.conf.example

    • /etc/otel/collector/splunk-support-bundle.sh

  • For information about some of the other files that can’t be removed by the uninstall commands, see messages in your command-line interface after you run an uninstall command.

Uninstall the Collector and Fluentd on Linux 🔗

Note

Before you perform the uninstall, be sure to understand its impact. See Understand which files are deleted by the uninstall.

If you installed the Collector and Fluentd using the installer script or Debian or RPM package, you can uninstall both of these packages by running the following command:

curl -sSL https://dl.signalfx.com/splunk-otel-collector.sh > /tmp/splunk-otel-collector.sh;
sudo sh /tmp/splunk-otel-collector.sh --uninstall

Note that this snippet includes a command that downloads the latest splunk-otel-collector.sh installer script before performing the uninstall. We include this command because:

  • If you used the Debian or RPM package to do the install, you might not have the installer script and need to download it to use this uninstall command.

  • If you used the installer script to perform the install, you might not have the latest installer script downloaded.

To verify the uninstall, see Verify the uninstall of the Collector and Fluentd on Linux.

If you don’t want to uninstall both packages and just want to uninstall the Collector package or Fluentd package, see Uninstall only the Collector or Fluentd on Linux.

Uninstall only the Collector or Fluentd on Linux 🔗

The uninstall command described in Uninstall the Collector and Fluentd on Linux uninstalls both the Collector and Fluentd packages.

If you want to uninstall only the Collector package or the Fluentd package, use the following command for your platform.

For Debian 🔗

Note

Before performing an uninstall, see Understand which files are deleted by the uninstall.

  • To uninstall the Collector package only, run the following command:

    sudo apt-get purge splunk-otel-collector
    
  • To uninstall the Fluentd package only, run the following command:

    sudo apt-get purge td-agent
    

For RPM 🔗

Note

Before performing an uninstall, see Understand which files are deleted by the uninstall.

  • To uninstall the Collector package only, run the command for the package manager on your system:

    sudo yum remove splunk-otel-collector
    

    or

    sudo dnf remove splunk-otel-collector
    

    or

    sudo zypper remove splunk-otel-collector
    
  • To uninstall the Fluentd package only, run the command for the package manager on your system:

    sudo yum remove td-agent
    

    or

    sudo dnf remove td-agent
    

    or

    sudo zypper remove td-agent
    

To verify the uninstall, see Verify the uninstall of the Collector and Fluentd on Linux.

Verify the uninstall of the Collector and Fluentd on Linux 🔗

While you can verify the uninstall of the Collector and Fluentd packages by watching for success messages in your command-line interface after running an uninstall command, you can also verify the uninstall by running a command that checks on the status of the Collector and Fluentd services. If the package has been successfully uninstalled, the status reflects this.

  • To verify the uninstall of the Collector package, run this command:

    sudo systemctl status splunk-otel-collector
    

    The expected result is Unit splunk-otel-collector.service could not be found.

  • To verify the uninstall of the Fluentd (td-agent) package, run this command:

    sudo systemctl status td-agent
    

    The expected result is Unit td-agent.service could not be found.