It is possible to keep all the websites information (names, defined goals, etc.) and only delete the stored analytics data. There is not currently a tool available to delete all data automatically, but you can manually delete all data for a specific website directly within the database server.
Connect to your Mysql database storing your Piwik data with your favorite database client (for example phpMyadmin) and do the following:
To delete statistics data for all websites, run the following query for each piwik_archive_* table:
DROP TABLE piwik_archive_numeric_Y, piwik_archive_blob_Y;
To delete statistics data for a given website, run the following query for each piwik_archive_* table:
DELETE FROM piwik_archive_numeric_Y, piwik_archive_blob_Y WHERE idsite = X;
The archive tables will automatically be re-created from the Visitor logs when Piwik processes your reports (assuming you do not purge your old visitor log data).
To delete log data for a given website, execute the following query:
DELETE FROM piwik_log_visit WHERE idsite = X; DELETE FROM piwik_log_link_visit_action WHERE idsite = X; DELETE FROM piwik_log_conversion WHERE idsite = X; DELETE FROM piwik_log_conversion_item WHERE idsite = X;
with X replaced by the website ID you wish to reset.
The alternative solution is to use the Delete old reports and Delete old tracking data features, click to see the FAQ.