The Scalyr agent doc includes a section for uninstalling the Scalyr agent. Users who have tried the instruction may notice that the agent config file /etc/scalyr-agent-2/agent.json
isn't removed upon completion of the uninstall. This is an expected behavior due to that by default, package manager remove will (intentionally) leave config files in place. To fully remove everything, users need to use the package manager purge option.
Upon completion of Scalyr agent installation, there should be 3 directories created
-
/var/log/scalyr-agent-2
(agent log) /var/lib/scalyr-agent-2
(state files, checkpoints)/usr/share/scalyr-agent-2
(actual source code) and symlinks to the binary in/usr/local/bin
Regular package manager remove (non-purge) should clean everything, but leave /var/lib and /etc/ directory in place. To clean up config files, users need to execute "purge" against the Scalyr agent.
sudo scalyr-agent-2 stop sudo apt-get purge scalyr-agent-2 -y sudo apt-get purge scalyr-repo -y rm -Rf /etc/scalyr-agent-2/ rm -Rf /var/lib/scalyr-agent-2/ rm -Rf /var/log/scalyr-agent-2/ rm -Rf /usr/share/scalyr-agent-2/
Comments
0 comments
Please sign in to leave a comment.