remove all rr added by cpanel at update


Well-Known Member
Mar 2, 2004
Just realised that all zones in the different nameservers we run on cpanel servers have got a number of extra records added after an (earlier) upgrade. Records such as:
cpcalendars IN A
cpcontacts IN A

How can we get rid of these added records? They are not in our templates and we do not use them.

Would be very nice if this type of things were not added automatically...

Are there any tools/scripts for this provided by cPanel?

A script looping through all zones and deleting the rows for cpcalendars, cpcontacts would be nice. Guess it would also have to update serial ...

Suppose it could be done via API, but with many thousands of Zones this will take a lot of time I guess



Well-Known Member
Mar 2, 2004
Here are the Release Notes re: CalDav and CardDav being added:
11.50 Release Notes - Documentation - cPanel Documentation
Thank you for the quick reply, but I am not sure I understand the reply. I reread the release doc and cant find anything in it that helps me. It only say that there is now support for CalDAV and CardDAV. Cant find that it say anywhere that it will add rows to all zones in name servers (regardless of those zones being for actual accounts or not). Adding support for CalDAV and CardDAV when it comes as a new feature should be done by choise from us, not by surprise... (but this is another discussion and there are threads about that already)

I can't see anything in the docs you linked to, that can help me getting rid of all those lines added.

I found a couple of old scripts I have used earlier plus some in the forum and guess I could just:

First a backup
    cp -a /var/named /var/named-backup

Then remove the lines including cpcalendars (and other unwanted lines)
   find /var/named/*.db -exec sed --in-place '/cpcalendars/d' "{}" ';'

Then change serial
     find /var/named/*.db -exec perl -pi -e 'if (/^\s+(\d{10})\s+;\s+serial/i) { my $i = $1+1; s/$1/$i/;}' '{}' \;

and restart named


Well-Known Member
May 20, 2003
cPanel Access Level
Root Administrator
I can't help you with your primary question or script, I responded to your comment about not using it with details as to what it is. You might not use now, but you might if you knew what it is. Assuming you do know and need a way to remove what you need to, I'll leave the help for that to someone else.

Sorry I can't help more.