<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Reduce the kept OneAgent versions on Linux-OS, Reduce Diskusage, and Reduce Security Risk in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/Reduce-the-kept-OneAgent-versions-on-Linux-OS-Reduce-Diskusage/m-p/274688#M38135</link>
    <description>&lt;H2&gt;The pain and benefit&lt;/H2&gt;
&lt;P&gt;The Dynatrace-OneAgent (OA) keept up to 10 older versions in /opt/dynatrace/oneagent/agent/bin then the "current" used version.&lt;/P&gt;
&lt;P&gt;This RFE should give a better way to:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Reduce the number of OA installation&lt;/LI&gt;
&lt;LI&gt;Reduce waste of storage usage&lt;/LI&gt;
&lt;LI&gt;Reduce the security risks of old installations&lt;/LI&gt;
&lt;LI&gt;Keep OneAgent better up to date if the disk free for an OA update is tight&lt;/LI&gt;
&lt;LI&gt;Reduce the coast of storage by the customer&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;How it works?&lt;/H2&gt;
&lt;UL&gt;
&lt;LI&gt;All installation that are not the current installation and older then the last boot can be removed&lt;/LI&gt;
&lt;LI&gt;Find all remove candidates&lt;/LI&gt;
&lt;LI&gt;Remove all never be used old installations&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Where are the installations keept?&lt;/H2&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;PRE&gt;ls -1 /opt/dynatrace/oneagent/agent/bin&lt;/PRE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On a typical and longer running machine you have up to 11 versions&amp;nbsp; The used version is link by current and has the full installation of the OneAgent. Older installations are reduced of usage.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;PRE&gt; ls -l  /opt/dynatrace/oneagent/agent/bin
total 0
drwxrwxr-x. 6 root dtuser 82 Aug  6  2024 1.293.168.20240805-161707
drwxrwxr-x. 6 root dtuser 82 Aug 21  2024 1.295.70.20240820-160945
drwxrwxr-x. 6 root dtuser 82 Sep  6  2024 1.297.63.20240905-133818
drwxrwxr-x. 6 root dtuser 82 Sep 30  2024 1.297.74.20240930-123813
drwxrwxr-x. 6 root dtuser 82 Oct  1  2024 1.299.50.20240930-123825
drwxrwxr-x. 6 root dtuser 82 Nov 18 15:27 1.303.50.20241118-133432
drwxrwxr-x. 6 root dtuser 82 Nov 30 11:45 1.303.62.20241129-131342
drwxrwxr-x. 6 root dtuser 82 Feb  3 23:16 1.305.109.20250203-163926
drwxrwxr-x. 6 root dtuser 82 Feb 13 15:04 1.305.110.20250213-112827
drwxrwxr-x. 6 root dtuser 82 Jan 14 20:01 1.305.98.20250114-172617
drwxrwxr-x. 6 root dtuser 82 Feb 26 17:57 1.307.61.20250226-155505
lrwxrwxrwx. 1 root dtuser 24 Mar 12 06:00 current -&amp;gt; 1.307.61.20250226-155505

&lt;/PRE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;H3&gt;The diskusage of these OA is actually&lt;/H3&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;PRE&gt; du -hcs /opt/dynatrace/oneagent/agent/bin/1.*
50M     /opt/dynatrace/oneagent/agent/bin/1.293.168.20240805-161707
32M     /opt/dynatrace/oneagent/agent/bin/1.295.70.20240820-160945
32M     /opt/dynatrace/oneagent/agent/bin/1.297.63.20240905-133818
32M     /opt/dynatrace/oneagent/agent/bin/1.297.74.20240930-123813
32M     /opt/dynatrace/oneagent/agent/bin/1.299.50.20240930-123825
33M     /opt/dynatrace/oneagent/agent/bin/1.303.50.20241118-133432
33M     /opt/dynatrace/oneagent/agent/bin/1.303.62.20241129-131342
33M     /opt/dynatrace/oneagent/agent/bin/1.305.109.20250203-163926
33M     /opt/dynatrace/oneagent/agent/bin/1.305.110.20250213-112827
33M     /opt/dynatrace/oneagent/agent/bin/1.305.98.20250114-172617
958M    /opt/dynatrace/oneagent/agent/bin/1.307.61.20250226-155505
1.3G    total&lt;/PRE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;In this case it waste&amp;nbsp; around 350 MB of old OA versions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;The candiate to reduce&lt;/H3&gt;
&lt;P&gt;&amp;nbsp; All installation that are older then the last boot. But exclude the current installation&lt;/P&gt;
&lt;P&gt;The last time of boot you see via "stat /dev/shm". All directories that are older then the directory "/dev/shm".&lt;/P&gt;
&lt;P&gt;In this&amp;nbsp; case all over the stat of "/dev/shm" shows:&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;PRE&gt; stat -c "%w | %n"  /opt/dynatrace/oneagent/agent/bin/1.* /dev/shm|sort -n
2024-08-08 20:04:22.970465391 +0200 | /opt/dynatrace/oneagent/agent/bin/1.293.168.20240805-161707
2024-09-12 20:07:41.300161636 +0200 | /opt/dynatrace/oneagent/agent/bin/1.295.70.20240820-160945
2024-10-02 07:00:45.239424904 +0200 | /opt/dynatrace/oneagent/agent/bin/1.297.63.20240905-133818
2024-10-09 07:01:15.395335667 +0200 | /opt/dynatrace/oneagent/agent/bin/1.297.74.20240930-123813
2024-10-29 06:01:09.263204351 +0100 | /opt/dynatrace/oneagent/agent/bin/1.299.50.20240930-123825
2024-11-25 06:00:35.737849190 +0100 | /opt/dynatrace/oneagent/agent/bin/1.303.50.20241118-133432
2024-12-05 06:00:39.114198974 +0100 | /opt/dynatrace/oneagent/agent/bin/1.303.62.20241129-131342
2025-02-05 06:00:34.337497537 +0100 | /opt/dynatrace/oneagent/agent/bin/1.305.98.20250114-172617
2025-02-12 06:01:08.312319174 +0100 | /opt/dynatrace/oneagent/agent/bin/1.305.109.20250203-163926
2025-02-19 06:00:32.854178575 +0100 | /opt/dynatrace/oneagent/agent/bin/1.305.110.20250213-112827
2025-03-12 06:00:24.400509625 +0100 | /opt/dynatrace/oneagent/agent/bin/1.307.61.20250226-155505
2025-04-01 21:13:14.998000012 +0200 | /dev/shm&lt;/PRE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As this machine has a younger uptime then the last installation, I have this following example from the support-ticket and shows that are installation exist&amp;nbsp; after "/dev/shm".&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;PRE&gt; stat -c "%w | %n"  /opt/dynatrace/oneagent/agent/bin/1.* /dev/shm|sort -n
2024-08-08 20:04:22.970465391 +0200 | /opt/dynatrace/oneagent/agent/bin/1.293.168.20240805-161707
2024-09-12 20:07:41.300161636 +0200 | /opt/dynatrace/oneagent/agent/bin/1.295.70.20240820-160945
2024-10-02 07:00:45.239424904 +0200 | /opt/dynatrace/oneagent/agent/bin/1.297.63.20240905-133818
2024-10-09 07:01:15.395335667 +0200 | /opt/dynatrace/oneagent/agent/bin/1.297.74.20240930-123813
2024-10-29 06:01:09.263204351 +0100 | /opt/dynatrace/oneagent/agent/bin/1.299.50.20240930-123825
2024-11-25 06:00:35.737849190 +0100 | /opt/dynatrace/oneagent/agent/bin/1.303.50.20241118-133432
2024-12-05 06:00:39.114198974 +0100 | /opt/dynatrace/oneagent/agent/bin/1.303.62.20241129-131342
2025-02-05 06:00:34.337497537 +0100 | /opt/dynatrace/oneagent/agent/bin/1.305.98.20250114-172617
2025-02-12 06:01:08.312319174 +0100 | /opt/dynatrace/oneagent/agent/bin/1.305.109.20250203-163926
2025-02-19 06:00:32.854178575 +0100 | /opt/dynatrace/oneagent/agent/bin/1.305.110.20250213-112827
2025-03-04 21:38:04.028000012 +0100 | /dev/shm
2025-03-12 06:00:24.400509625 +0100 | /opt/dynatrace/oneagent/agent/bin/1.307.61.20250226-155505&lt;/PRE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;With following "one line command" you get all candidates to remove&lt;/H3&gt;
&lt;P&gt;Example with the "one line command"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;PRE&gt; stat -c "%w|%n"  /opt/dynatrace/oneagent/agent/bin/1.* /dev/shm | sort -n | grep -B 20 /dev/shm|grep -v dev/shm | grep -v $(ls -l /opt/dynatrace/oneagent/agent/bin/current | sed s/".* "//g)  | sed s/".*|"//g
/opt/dynatrace/oneagent/agent/bin/1.293.168.20240805-161707
/opt/dynatrace/oneagent/agent/bin/1.295.70.20240820-160945
/opt/dynatrace/oneagent/agent/bin/1.297.63.20240905-133818
/opt/dynatrace/oneagent/agent/bin/1.297.74.20240930-123813
/opt/dynatrace/oneagent/agent/bin/1.299.50.20240930-123825
/opt/dynatrace/oneagent/agent/bin/1.303.50.20241118-133432
/opt/dynatrace/oneagent/agent/bin/1.303.62.20241129-131342
/opt/dynatrace/oneagent/agent/bin/1.305.98.20250114-172617
/opt/dynatrace/oneagent/agent/bin/1.305.109.20250203-163926
/opt/dynatrace/oneagent/agent/bin/1.305.110.20250213-112827&lt;/PRE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;We keept the current installation&lt;/H3&gt;
&lt;P&gt;The current installation is 1.307.61 and must be kept.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;PRE&gt; ls -l  /opt/dynatrace/oneagent/agent/bin/current
lrwxrwxrwx. 1 root dtuser 24 Mar 12 06:00 /opt/dynatrace/oneagent/agent/bin/current -&amp;gt; 1.307.61.20250226-155505&lt;/PRE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would be a strong benefit to implement this behavior.&lt;/P&gt;
&lt;H2&gt;Does it works also on inside of container with dynatrace-operator?&lt;/H2&gt;
&lt;P&gt;I try it inside an OpenShift Container. It works inside of the "/mnt/host_root" where the OA is running inside.&lt;/P&gt;
&lt;H2&gt;Additon Info for Dynatrace-Staff&lt;/H2&gt;
&lt;P&gt;For Dyntrace staff you see info in "&amp;nbsp;&lt;A class="" href="https://one.dynatrace.com/hc/en-us/requests/460348" target="_blank" rel="noopener"&gt;https://one.dynatrace.com/hc/en-us/requests/460348&lt;/A&gt; - &lt;SPAN&gt;How to reduce the number of kept old OneAgents - Re: OneAgents keeps older version with unnessary security concern and disc usage" which is is a follow up from &lt;A class="" href="https://one.dynatrace.com/hc/en-us/requests/392314" target="_blank" rel="noopener"&gt;https://one.dynatrace.com/hc/en-us/requests/392314&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 27 Aug 2025 14:03:22 GMT</pubDate>
    <dc:creator>Uwe-Ebel</dc:creator>
    <dc:date>2025-08-27T14:03:22Z</dc:date>
    <item>
      <title>Reduce the kept OneAgent versions on Linux-OS, Reduce Diskusage, and Reduce Security Risk</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Reduce-the-kept-OneAgent-versions-on-Linux-OS-Reduce-Diskusage/m-p/274688#M38135</link>
      <description>&lt;H2&gt;The pain and benefit&lt;/H2&gt;
&lt;P&gt;The Dynatrace-OneAgent (OA) keept up to 10 older versions in /opt/dynatrace/oneagent/agent/bin then the "current" used version.&lt;/P&gt;
&lt;P&gt;This RFE should give a better way to:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Reduce the number of OA installation&lt;/LI&gt;
&lt;LI&gt;Reduce waste of storage usage&lt;/LI&gt;
&lt;LI&gt;Reduce the security risks of old installations&lt;/LI&gt;
&lt;LI&gt;Keep OneAgent better up to date if the disk free for an OA update is tight&lt;/LI&gt;
&lt;LI&gt;Reduce the coast of storage by the customer&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;How it works?&lt;/H2&gt;
&lt;UL&gt;
&lt;LI&gt;All installation that are not the current installation and older then the last boot can be removed&lt;/LI&gt;
&lt;LI&gt;Find all remove candidates&lt;/LI&gt;
&lt;LI&gt;Remove all never be used old installations&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H2&gt;Where are the installations keept?&lt;/H2&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;PRE&gt;ls -1 /opt/dynatrace/oneagent/agent/bin&lt;/PRE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On a typical and longer running machine you have up to 11 versions&amp;nbsp; The used version is link by current and has the full installation of the OneAgent. Older installations are reduced of usage.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;PRE&gt; ls -l  /opt/dynatrace/oneagent/agent/bin
total 0
drwxrwxr-x. 6 root dtuser 82 Aug  6  2024 1.293.168.20240805-161707
drwxrwxr-x. 6 root dtuser 82 Aug 21  2024 1.295.70.20240820-160945
drwxrwxr-x. 6 root dtuser 82 Sep  6  2024 1.297.63.20240905-133818
drwxrwxr-x. 6 root dtuser 82 Sep 30  2024 1.297.74.20240930-123813
drwxrwxr-x. 6 root dtuser 82 Oct  1  2024 1.299.50.20240930-123825
drwxrwxr-x. 6 root dtuser 82 Nov 18 15:27 1.303.50.20241118-133432
drwxrwxr-x. 6 root dtuser 82 Nov 30 11:45 1.303.62.20241129-131342
drwxrwxr-x. 6 root dtuser 82 Feb  3 23:16 1.305.109.20250203-163926
drwxrwxr-x. 6 root dtuser 82 Feb 13 15:04 1.305.110.20250213-112827
drwxrwxr-x. 6 root dtuser 82 Jan 14 20:01 1.305.98.20250114-172617
drwxrwxr-x. 6 root dtuser 82 Feb 26 17:57 1.307.61.20250226-155505
lrwxrwxrwx. 1 root dtuser 24 Mar 12 06:00 current -&amp;gt; 1.307.61.20250226-155505

&lt;/PRE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;H3&gt;The diskusage of these OA is actually&lt;/H3&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;PRE&gt; du -hcs /opt/dynatrace/oneagent/agent/bin/1.*
50M     /opt/dynatrace/oneagent/agent/bin/1.293.168.20240805-161707
32M     /opt/dynatrace/oneagent/agent/bin/1.295.70.20240820-160945
32M     /opt/dynatrace/oneagent/agent/bin/1.297.63.20240905-133818
32M     /opt/dynatrace/oneagent/agent/bin/1.297.74.20240930-123813
32M     /opt/dynatrace/oneagent/agent/bin/1.299.50.20240930-123825
33M     /opt/dynatrace/oneagent/agent/bin/1.303.50.20241118-133432
33M     /opt/dynatrace/oneagent/agent/bin/1.303.62.20241129-131342
33M     /opt/dynatrace/oneagent/agent/bin/1.305.109.20250203-163926
33M     /opt/dynatrace/oneagent/agent/bin/1.305.110.20250213-112827
33M     /opt/dynatrace/oneagent/agent/bin/1.305.98.20250114-172617
958M    /opt/dynatrace/oneagent/agent/bin/1.307.61.20250226-155505
1.3G    total&lt;/PRE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;In this case it waste&amp;nbsp; around 350 MB of old OA versions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;The candiate to reduce&lt;/H3&gt;
&lt;P&gt;&amp;nbsp; All installation that are older then the last boot. But exclude the current installation&lt;/P&gt;
&lt;P&gt;The last time of boot you see via "stat /dev/shm". All directories that are older then the directory "/dev/shm".&lt;/P&gt;
&lt;P&gt;In this&amp;nbsp; case all over the stat of "/dev/shm" shows:&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;PRE&gt; stat -c "%w | %n"  /opt/dynatrace/oneagent/agent/bin/1.* /dev/shm|sort -n
2024-08-08 20:04:22.970465391 +0200 | /opt/dynatrace/oneagent/agent/bin/1.293.168.20240805-161707
2024-09-12 20:07:41.300161636 +0200 | /opt/dynatrace/oneagent/agent/bin/1.295.70.20240820-160945
2024-10-02 07:00:45.239424904 +0200 | /opt/dynatrace/oneagent/agent/bin/1.297.63.20240905-133818
2024-10-09 07:01:15.395335667 +0200 | /opt/dynatrace/oneagent/agent/bin/1.297.74.20240930-123813
2024-10-29 06:01:09.263204351 +0100 | /opt/dynatrace/oneagent/agent/bin/1.299.50.20240930-123825
2024-11-25 06:00:35.737849190 +0100 | /opt/dynatrace/oneagent/agent/bin/1.303.50.20241118-133432
2024-12-05 06:00:39.114198974 +0100 | /opt/dynatrace/oneagent/agent/bin/1.303.62.20241129-131342
2025-02-05 06:00:34.337497537 +0100 | /opt/dynatrace/oneagent/agent/bin/1.305.98.20250114-172617
2025-02-12 06:01:08.312319174 +0100 | /opt/dynatrace/oneagent/agent/bin/1.305.109.20250203-163926
2025-02-19 06:00:32.854178575 +0100 | /opt/dynatrace/oneagent/agent/bin/1.305.110.20250213-112827
2025-03-12 06:00:24.400509625 +0100 | /opt/dynatrace/oneagent/agent/bin/1.307.61.20250226-155505
2025-04-01 21:13:14.998000012 +0200 | /dev/shm&lt;/PRE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As this machine has a younger uptime then the last installation, I have this following example from the support-ticket and shows that are installation exist&amp;nbsp; after "/dev/shm".&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;PRE&gt; stat -c "%w | %n"  /opt/dynatrace/oneagent/agent/bin/1.* /dev/shm|sort -n
2024-08-08 20:04:22.970465391 +0200 | /opt/dynatrace/oneagent/agent/bin/1.293.168.20240805-161707
2024-09-12 20:07:41.300161636 +0200 | /opt/dynatrace/oneagent/agent/bin/1.295.70.20240820-160945
2024-10-02 07:00:45.239424904 +0200 | /opt/dynatrace/oneagent/agent/bin/1.297.63.20240905-133818
2024-10-09 07:01:15.395335667 +0200 | /opt/dynatrace/oneagent/agent/bin/1.297.74.20240930-123813
2024-10-29 06:01:09.263204351 +0100 | /opt/dynatrace/oneagent/agent/bin/1.299.50.20240930-123825
2024-11-25 06:00:35.737849190 +0100 | /opt/dynatrace/oneagent/agent/bin/1.303.50.20241118-133432
2024-12-05 06:00:39.114198974 +0100 | /opt/dynatrace/oneagent/agent/bin/1.303.62.20241129-131342
2025-02-05 06:00:34.337497537 +0100 | /opt/dynatrace/oneagent/agent/bin/1.305.98.20250114-172617
2025-02-12 06:01:08.312319174 +0100 | /opt/dynatrace/oneagent/agent/bin/1.305.109.20250203-163926
2025-02-19 06:00:32.854178575 +0100 | /opt/dynatrace/oneagent/agent/bin/1.305.110.20250213-112827
2025-03-04 21:38:04.028000012 +0100 | /dev/shm
2025-03-12 06:00:24.400509625 +0100 | /opt/dynatrace/oneagent/agent/bin/1.307.61.20250226-155505&lt;/PRE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;With following "one line command" you get all candidates to remove&lt;/H3&gt;
&lt;P&gt;Example with the "one line command"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;PRE&gt; stat -c "%w|%n"  /opt/dynatrace/oneagent/agent/bin/1.* /dev/shm | sort -n | grep -B 20 /dev/shm|grep -v dev/shm | grep -v $(ls -l /opt/dynatrace/oneagent/agent/bin/current | sed s/".* "//g)  | sed s/".*|"//g
/opt/dynatrace/oneagent/agent/bin/1.293.168.20240805-161707
/opt/dynatrace/oneagent/agent/bin/1.295.70.20240820-160945
/opt/dynatrace/oneagent/agent/bin/1.297.63.20240905-133818
/opt/dynatrace/oneagent/agent/bin/1.297.74.20240930-123813
/opt/dynatrace/oneagent/agent/bin/1.299.50.20240930-123825
/opt/dynatrace/oneagent/agent/bin/1.303.50.20241118-133432
/opt/dynatrace/oneagent/agent/bin/1.303.62.20241129-131342
/opt/dynatrace/oneagent/agent/bin/1.305.98.20250114-172617
/opt/dynatrace/oneagent/agent/bin/1.305.109.20250203-163926
/opt/dynatrace/oneagent/agent/bin/1.305.110.20250213-112827&lt;/PRE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H3&gt;We keept the current installation&lt;/H3&gt;
&lt;P&gt;The current installation is 1.307.61 and must be kept.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD&gt;
&lt;PRE&gt; ls -l  /opt/dynatrace/oneagent/agent/bin/current
lrwxrwxrwx. 1 root dtuser 24 Mar 12 06:00 /opt/dynatrace/oneagent/agent/bin/current -&amp;gt; 1.307.61.20250226-155505&lt;/PRE&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It would be a strong benefit to implement this behavior.&lt;/P&gt;
&lt;H2&gt;Does it works also on inside of container with dynatrace-operator?&lt;/H2&gt;
&lt;P&gt;I try it inside an OpenShift Container. It works inside of the "/mnt/host_root" where the OA is running inside.&lt;/P&gt;
&lt;H2&gt;Additon Info for Dynatrace-Staff&lt;/H2&gt;
&lt;P&gt;For Dyntrace staff you see info in "&amp;nbsp;&lt;A class="" href="https://one.dynatrace.com/hc/en-us/requests/460348" target="_blank" rel="noopener"&gt;https://one.dynatrace.com/hc/en-us/requests/460348&lt;/A&gt; - &lt;SPAN&gt;How to reduce the number of kept old OneAgents - Re: OneAgents keeps older version with unnessary security concern and disc usage" which is is a follow up from &lt;A class="" href="https://one.dynatrace.com/hc/en-us/requests/392314" target="_blank" rel="noopener"&gt;https://one.dynatrace.com/hc/en-us/requests/392314&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 27 Aug 2025 14:03:22 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Reduce-the-kept-OneAgent-versions-on-Linux-OS-Reduce-Diskusage/m-p/274688#M38135</guid>
      <dc:creator>Uwe-Ebel</dc:creator>
      <dc:date>2025-08-27T14:03:22Z</dc:date>
    </item>
  </channel>
</rss>

