<?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 Re: Disk usage and cleanup audit report in Firewall and Security Management</title>
    <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Disk-usage-and-cleanup-audit-report/m-p/277241#M105517</link>
    <description>&lt;P&gt;Acknowledging a recent post and replies:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.checkpoint.com/t5/Firewall-and-Security-Management/System-Clean-up/m-p/267101" target="_blank"&gt;https://community.checkpoint.com/t5/Firewall-and-Security-Management/System-Clean-up/m-p/267101&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 May 2026 16:53:15 GMT</pubDate>
    <dc:creator>Don_Paterson</dc:creator>
    <dc:date>2026-05-20T16:53:15Z</dc:date>
    <item>
      <title>Disk usage and cleanup audit report</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Disk-usage-and-cleanup-audit-report/m-p/277240#M105516</link>
      <description>&lt;P&gt;Is there anything better than this out there?&lt;/P&gt;
&lt;P&gt;It's the age old disk space monitoring and clean-up story.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If anyone wants to test this:&lt;/P&gt;
&lt;P&gt;Save the script to:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;cp_safe_cleanup_report.sh&lt;/STRONG&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;dos2unix cp_safe_cleanup_report.sh&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;chmod 700 cp_safe_cleanup_report.sh&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;./cp_safe_cleanup_report.sh&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The script file is attached.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example output (from lab):&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;
[Expert@A-SMS:0]# ./cp_safe_cleanup_report.sh

Check Point Management Server — Cleanup Audit (REPORT ONLY)
Timestamp:  20260520_180058
Hostname:   A-SMS
Report:     /var/log/cp_cleanup_report_20260520_180058.txt

Files older than 30 days and ≥ 10 MB are flagged.
NO FILES WILL BE DELETED.

==============================================================
 0. DISK USAGE OVERVIEW
==============================================================

df -h (local filesystems):
Filesystem                      Type  Size  Used Avail Use% Mounted on
/dev/mapper/vg_splat-lv_current xfs    30G   14G   17G  45% /
/dev/sda2                       ext3  291M   58M  218M  21% /boot
/dev/mapper/vg_splat-lv_log     xfs    90G  5.7G   85G   7% /var/log

Top 10 directories under / by size (excluding /proc, /sys):
14G     /
9.7G    /opt
3.0G    /opt/CPshrd-R81.20
2.5G    /opt/CPsuite-R81.20
2.1G    /var
1.2G    /var/lib
1.2G    /opt/CPDiffReportServer
944M    /usr
921M    /var/opt
784M    /opt/CPrt-R81.20

Top 10 directories under /var/log by size:
5.7G    /var/log
2.0G    /var/log/opt
1.5G    /var/log/AutoUpdater
1.4G    /var/log/opt/CPsuite-R81.20/fw1
1.4G    /var/log/opt/CPsuite-R81.20
1.3G    /var/log/AutoUpdater/repository
1.2G    /var/log/CPDepInst/repository
1.2G    /var/log/CPDepInst
926M    /var/log/CPda
876M    /var/log/CPda/metadata

==============================================================
 1. UNMANAGED FILES (candidates for manual deletion)
==============================================================

--- cpinfo bundles (TAC diagnostic dumps) ---
Base path: /
Pattern:   cpinfo*.tgz
Filter:    -mtime +30 -size +10M
No matches.

--- cpinfo bundles (alternate naming) ---
Base path: /
Pattern:   cpinfo*.tar.gz
Filter:    -mtime +30 -size +10M
No matches.

--- tcpdump capture files (.cap) ---
Base path: /
Pattern:   *.cap
Filter:    -mtime +30 -size +10M
No matches.

--- tcpdump capture files (.pcap) ---
Base path: /
Pattern:   *.pcap
Filter:    -mtime +30 -size +10M
No matches.

--- fw monitor captures (typically in /var/log) ---
Base path: /var/log
Pattern:   fwmonitor*
Filter:    -mtime +30 -size +10M
No matches.

--- Core dumps ---
Searching common core-dump locations...
No core dumps found.

--- Stale tarballs in /home (admin uploads, exports) ---
Base path: /home
Pattern:   *.tgz
Filter:    -mtime +30 -size +10M
No matches.

--- Stale tarballs in /home (.tar.gz) ---
Base path: /home
Pattern:   *.tar.gz
Filter:    -mtime +30 -size +10M
No matches.

--- Stale files in /tmp ---
Base path: /tmp
Pattern:   *
Filter:    -mtime +30 -size +10M
No matches.

--- Stale files in /var/tmp ---
Base path: /var/tmp
Pattern:   *
Filter:    -mtime +30 -size +10M
No matches.

--- Compressed rotated logs (.gz) in /var/log (non-CP) ---
Base path: /var/log
Pattern:   *.gz
Filter:    -mtime +30
No matches.

--- migrate_server / upgrade_export outputs in /var/log/mgmt_migrate ---
Base path: /var/log/mgmt_migrate
Pattern:   *.tgz
(path does not exist on this system — skipping)

--- Upgrade tools output (in /var/log/upgrade*) ---
Base path: /var/log
Pattern:   upgrade_export*.tgz
No matches.

==============================================================
 1.5 UPDATE/INSTALL SUBSYSTEMS (informational — see notes per system)
==============================================================

Three distinct subsystems write to /var/log:

  1. CPUSE (Check Point Upgrade Service Engine)
     Paths:   /var/log/CPda/repository  +  /opt/CPda/backup
     Holds:   JHF bundles, full-image upgrade packages, Blink images
     Clean:   clish -c "installer delete &amp;lt;num&amp;gt;"
     List:    clish -c "show installer packages all"

  2. AutoUpdater (CME, signature, Maestro auto-updates)
     Path:    /var/log/AutoUpdater/repository
     Holds:   CloudGuard CME, ThreatCloud, signature/blade auto-updates
     Clean:   DO NOT manually delete — this is automatically
              managed by the AutoUpdater service. If genuinely bloated,
              open a TAC case rather than touching the directory.

  3. CPDepInst (Deployment Agent install/staging working dirs)
     Path:    /var/log/CPDepInst/repository  +  /var/log/tmp/CPDepInst_*
     Holds:   Transient staging from deployment operations; can leak
              empty directories over time (see CheckMates discussions).
     Clean:   For empty CPDepInst_&amp;lt;id&amp;gt; dirs under /var/log/tmp/,
              cleanup is safe. For /var/log/CPDepInst/repository content,
              treat as managed and verify with TAC before deletion.

--- Directory sizes ---

CPUSE:
50M     /var/log/CPda/repository
0       /opt/CPda/backup

AutoUpdater:
1.5G    /var/log/AutoUpdater
1.3G    /var/log/AutoUpdater/repository
284M    /var/log/AutoUpdater/metadata

CPDepInst:
1.2G    /var/log/CPDepInst
1.2G    /var/log/CPDepInst/repository

  Empty CPDepInst_* dirs in /var/log/tmp:     0 (safe to remove)
  Non-empty CPDepInst_* dirs in /var/log/tmp: 0 (inspect before removing)

--- CPUSE installer status ---
**             ************************************************************************* **
**                         Connection error. Packages list might be incomplete           **
**             ************************************************************************* **
Show packages: no packages to display

Note: the Deployment Agent reported a connection error or empty list.
This typically means one of:
  - The system has no internet egress to the Check Point cloud right now
  - The DA service ($DADIR/scripts/DAService) is not running or is unhealthy
  - The local repository genuinely has no packages tracked
Run $DADIR/scripts/DAService status and check /var/log/CPda/cpda.elg for detail.

Rule of thumb: keep the currently-installed JHF backup and the
immediately prior one in /opt/CPda/backup/...#BUNDLE_..._JUMBO_HF_MAIN#nn/.
Older Jumbo backups can usually be removed via 'installer delete' — but
verify with 'show installer packages all' first.

==============================================================
 2. GAIA SNAPSHOTS (managed — use clish 'delete snapshot' if needed)
==============================================================

Snapshots consume space in /var/log/CPsnapshot and /boot.
NEVER delete snapshot files directly from the filesystem.
Use clish: delete snapshot &amp;lt;name&amp;gt;

Output of 'clish -c "show snapshots"':

Restore points:
---------------
snapshot1

Creation of an additional restore point will need 15.464G
Amount of space available for restore points is 73.97G

Snapshots present: 1

Actual snapshot storage (LVM):
Note: snapshots are LVM logical volumes in the vg_splat volume
group, not files in /var/CPsnapshot. The directories below hold only
metadata and will appear small even when snapshots are gigabytes.

Logical volumes in vg_splat:
  LV           VG       Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lv_current   vg_splat -wi-ao---- 30.00g
  lv_log       vg_splat -wi-ao---- 90.00g
  lv_snapshot1 vg_splat -wi-a----- 17.04g

Volume group summary:
  VG       #PV #LV #SN Attr   VSize   VFree
  vg_splat   1   3   0 wz--n- 244.02g 106.97g

Authoritative capacity figures (from 'show snapshots' above):
Creation of an additional restore point will need 15.464G
Amount of space available for restore points is 73.97G

Snapshot metadata directories (small — bookkeeping only, not the snapshot):
84K     /var/log/CPsnapshot
21M     /var/CPsnapshot

==============================================================
 3. SUMMARY &amp;amp; RECOMMENDED NEXT STEPS
==============================================================

Full report written to: /var/log/cp_cleanup_report_20260520_180058.txt

Recommended workflow:

  1. Review the report. For each flagged file, confirm it is not needed
     (TAC case open? Audit retention requirements? Recent troubleshooting?)

  2. For unmanaged files (Section 1): plain 'rm' is safe once you have
     confirmed the file is not in use. For .log files specifically, stop
     log writers first ('cpstop' — incurs downtime per sk63361 Exception 2).

  3. For snapshots (Section 2): use clish delete snapshot &amp;lt;name&amp;gt;.
     Never 'rm -rf' snapshot directories.

  4. After cleanup, re-run this script to confirm space recovered, or run
     'df -h' directly.

Audit complete. No files were modified.

[Expert@A-SMS:0]#
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2026 17:11:28 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Disk-usage-and-cleanup-audit-report/m-p/277240#M105516</guid>
      <dc:creator>Don_Paterson</dc:creator>
      <dc:date>2026-05-20T17:11:28Z</dc:date>
    </item>
    <item>
      <title>Re: Disk usage and cleanup audit report</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Disk-usage-and-cleanup-audit-report/m-p/277241#M105517</link>
      <description>&lt;P&gt;Acknowledging a recent post and replies:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.checkpoint.com/t5/Firewall-and-Security-Management/System-Clean-up/m-p/267101" target="_blank"&gt;https://community.checkpoint.com/t5/Firewall-and-Security-Management/System-Clean-up/m-p/267101&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2026 16:53:15 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Disk-usage-and-cleanup-audit-report/m-p/277241#M105517</guid>
      <dc:creator>Don_Paterson</dc:creator>
      <dc:date>2026-05-20T16:53:15Z</dc:date>
    </item>
    <item>
      <title>Re: Disk usage and cleanup audit report</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Disk-usage-and-cleanup-audit-report/m-p/277245#M105519</link>
      <description>&lt;P&gt;Very cool, thank you!&lt;/P&gt;
&lt;P&gt;Ran without issues for me.&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2026 19:39:26 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Disk-usage-and-cleanup-audit-report/m-p/277245#M105519</guid>
      <dc:creator>CaseyB</dc:creator>
      <dc:date>2026-05-20T19:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: Disk usage and cleanup audit report</title>
      <link>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Disk-usage-and-cleanup-audit-report/m-p/277246#M105520</link>
      <description>&lt;P&gt;Excellent stuff, Don.&lt;/P&gt;</description>
      <pubDate>Wed, 20 May 2026 19:45:30 GMT</pubDate>
      <guid>https://community.checkpoint.com/t5/Firewall-and-Security-Management/Disk-usage-and-cleanup-audit-report/m-p/277246#M105520</guid>
      <dc:creator>the_rock</dc:creator>
      <dc:date>2026-05-20T19:45:30Z</dc:date>
    </item>
  </channel>
</rss>

