---
title: "Timeseriesrrd-housekeeping"
description: "The Timeseriesrrd-housekeeping script removes old and unused RRD files from the timeseries server to reduce disk space usage. You can automate this cleanup by scheduling the script with cron and adjust retention days to manage data storage."
url: "https://docs.itrsgroup.com/docs/faq/opsview/5879837945757-opsview-timeseriesrrd-housekeeping/index.html"
---
Housekeeping script to remove old/unused RRD files from timeseries, removes old and unused RRD from the timeseries server.

## Synopsis

```
su - opsview
export PERL5LIB=/opt/opsview/timeseriesrrd/lib:$PERL5LIB
/opt/opsview/supportscripts/bin/opsview-timeseriesrrd-housekeeping
```

## Description

Remove old and unused RRD from the timeseries server, to reduce disk space usage.

Add an entry to cron in order to run the script once per day (if you like)

BUG - OP-25201

## Example

The below directory is filling up in space/size and if you want to tidy this up, the script does this for you:

```
du -sh /opt/opsview/timeseriesrrd/var/data/*
```

And another alternative is also to reduce the default retention days by editing the below retention days:

```
vim /opt/opsview/timeseriesrrd/etc/timeseriesrrd.yaml
```

```
5 timeseriesrrd:
6 data_dir: /opt/opsview/timeseriesrrd/var/data
7 retention_days: 30
8 rrd:
```

For these changes to take effect restart the below components:

```
/opt/opsview/watchdog/bin/opsview-monit restart opsview-timeseriesrrdqueries
/opt/opsview/watchdog/bin/opsview-monit restart opsview-timeseriesrrdupdates
```


