Forum Discussion

rg-f5's avatar
rg-f5
Icon for Nimbostratus rankNimbostratus
Apr 27, 2024

Disk space full - what files, folders are safe to delete?

Hi I've searched Dev Central for help with clearing disk space.

 

I am happy to use bash as I have now figured out how to display files within var/log directory and use the "rm" command to remove files.

I can see the files within the var/log

I have read articles about maintaining disk space. 

I have deleted ucs, software images. 

These files are at ".1 or .2.gz" 0 or not even on any of the F5 var/log directories 

/dev/mapper/vg--db--vda-dat.log 2.9G 2.9G 0 100% /var/log

/dev/mapper/vg--db--vda-dat.share 15G 5.4G 8.5G 39%

So far I have the above. 

What files are safe to delete from the /var/log or any other directories? 

 

Or can I delete file contents silently without affecting performance or service?

 

What would be good bash commands to rm or clear files/ folders?

 

 

4 Replies

  • download WINSCP and connect using scp protocol or SFTP. change the advance settings use bash shell for defaults folder ,navigate to the /var folder, you can now check and select what does you like to delete  navigate and delete from WINSCP like windows explorer 

    Don't delete files from production boxes without taking a proper ucs backup and also take qkview.

    • rg-f5's avatar
      rg-f5
      Icon for Nimbostratus rankNimbostratus

      Thanks this actually helps a lot. But what files are safe to delete in /var/log folder without causing any issues?

       

      I understand UCS backups.

      • zamroni777's avatar
        zamroni777
        Icon for Cumulonimbus rankCumulonimbus

        you can check via ls in ssh console or sftp above to see which files in /var/log has big size

        /var/log/ltm might be the one as log command in irules usually writes to it.

        instead of delete, you can empty the file using command "cat /dev/null > /var/log/thefilename"

  • This article might help a bit.

    https://my.f5.com/manage/s/article/K14403