Remove Multiple Saved Config files from CLI?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Remove Multiple Saved Config files from CLI?

L2 Linker

I recenlty received an alert for /opt/pancfg at 80% full.  It looks like there must be a bug in a PAN-OS version that seemed to be saving off configs every hour, with a random naming convention of "5rkswfabcbep_5syszjl7hw0j.txt" There are hundreds of these files dating back to last year.  It doesn't work when you try to specify a wildcard (*) to match partial filenames, so this would take hours of manual work to clean out.  Other than raising a support ticket with TAC and have them do this as root which would clear this out quickly, what other options do I have?

1 REPLY 1

Cyber Elite
Cyber Elite

Hi @brucegarlock 

What PAN-OS version you you have installed? Sounds like a very strange bug.

You have the option with creating a little script that fetches the filenames and then sends a delete command over the api for each file. Or you list all the filenames in a cli session, take this list into a texteditor and then add the required commands for the file deletion. This list with all the delete commands you then paste into the cli session and all files will be deleted.

Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!