---
title: Purge the processed access logs from ABS
description: A purge.sh script either archives or purges processed access log files.
component: pingintelligence
version: 5.2
page_id: pingintelligence:pingintelligence_reference_guide:pingintelligence_purge_access_logs_abs
canonical_url: https://docs.pingidentity.com/pingintelligence/5.2/pingintelligence_reference_guide/pingintelligence_purge_access_logs_abs.html
revdate: April 3, 2024
section_ids:
  external-log-archival: External log archival
---

# Purge the processed access logs from ABS

A `purge.sh` script either archives or purges processed access log files.

The access log files are stored in the `/opt/pingidentity/abs/data` directory.

|   |                                                                                                                                                                                  |
| - | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|   | When the `purge` script is run, the processed access log files are permanently deleted from the `/opt/pingidentity/abs/data` directory. Always backup the files before deleting. |

Located in the `/opt/pingidentity/abs/util` directory, the `purge` script deletes logs older than the specified number of days. Run the script using the API Behavioral Security (ABS) command line. For example:

```
/opt/pingidentity/abs/util/purge.sh -d 3
In the above example, purge.sh deletes all access log files older than 3 days. Here is sample output.
/opt/pingidentity/abs/util/purge.sh -d 3
This will delete the data in /opt/ pingidentity/abs/data which is older than 3 days.
Are you sure (yes/no): yes
removing /opt/pingidentity/abs/data/2018-04-10-11_21/9k2unv5l2bsgurneot3s3pmt03/ : last changed at Mon Jan 10 11:32:31 IST 2018
removing /opt/ pingidentity/abs/data/2018-04-10-11_21/ilq67a3g5sve2pmpkkp271o37c/ : last changed at Mon Jan 10 11:32:31 IST 2018
```

## External log archival

The `purge` script can also archive logs older than the specified number of days to secondary storage. Use the `-l` option and include the path of the secondary storage to archive log files. For example:

```
/opt/pingidentity/abs/util/purge.sh -d 3 -l /tmp/
```

In the above example, log files older than `3-days` are archived to the `tmp` directory. To automate log archival, add the script to a `cron` job.
