NC 17 migration to new server, problem with oc_filecache

I transferred NC from one server to another. Steps:

  1. Backup of the database and the data directory on the source server
  2. Drop database on new server, create a new one, import a dump from source server.
  3. Delete data directory on the new server and copy data from the source server
  4. Reinstall applications
    But i did not change the instanceid in config.php on new server.

What happened now.
On the new server, the directory appdata_newinstanceid was created.
Now i have two appdata catalogs: appdata_ newistanceid and appdata_oldinstanceid.
In addition, i see now values like “appdata_newinstanceid” and “appdata_oldinstanceid” in field
“path” of oc_filecache table.
Can I just delete the appdata_oldinstanceid directory and entries with appdata_oldinctanceid in the ok_filecache table?
Something like:
DELETE FROM oc_filecache WHERE path like ‘%appdata_oldinstanceid%’

Notifications dont works. Probably because there are records with appdata_oldinstanceid in oc_filecache.