Elastic Agent folder size growth

Hello everyone,

In some companies server administrators can be very picky when requesting to install new applications which for them will increase resource consumption.

In my case I have been notified that several servers have generated an additional consumption of disk space, exactly the Elastic Agent which they report weighs between 1.5 GB and 3GB.

This is what the administrator reports to me
image

Inside the Elastic folder there is another folder called Agent and inside it another folder called “data” among many others but “data” is keeping information from the previous version and the current version.

My questions

  1. Can I delete the folder of the previous version without worrying about it? [Do I have to stop the service first? or is it ok if I just delete it?]

  2. It would be good if whoever is in charge of this technical side of elastic sees it as an improvement opportunity to validate if it is possible that a new update deletes unnecessary information from the previous ones.

Thanks in advance for your comments

Did you upgrade recently?

The older version is kept for a couple of time, not sure exactly how much.

After that the components will be removed (but any logs and cursors are still kept).

I have this for example:

52K     ./elastic-agent-9db552
4.0K    ./tmp
108M    ./elastic-agent-8.17.1-b46c28
97M     ./elastic-agent-8.17.2-29bc86
1.7G    ./elastic-agent-8.17.3-0efe49
1.9G  

The older versions are basically logs and cursors.

1 Like

With your answer I am less worried, thank you very much.