How to clean a header from old code?

Hello. I am an amateur with some experience with Worpress or Prestashop. I made my first pages in Concrete. Unfortunately, I focused more on content than form, and so there were a lot of individually formatted elements on the page. This made the pages load very slowly. So I had to redo the whole site using css styles and removing many unnecessary areas. I have more or less recreated all the elements using css classes and deleted the old ones. The code has been reduced by more than half and loading is much faster. Nevertheless, it is still not enough - many old css styles remained in the code header, specifically for example:

.ccm-custom-style-main226230 {…}”

there are over 40 of them, many duplicates - but there are no such elements on the page anymore, everything is formatted via css classes.

How to clean the header? I cleared the cache…

Thank you.

You should look in your database for a table named ‘PageThemeCustomStyles’, you will probably find them lurking there.

There is now an easy way to do part of this. On /dashboard/pages/themes scroll down. There will be an amber button to ‘Reset’ customizations. This should clear all styles set in the design side panel.
I don’t think it changes anything in block or area design.

Thanks, but unfortunately it only changed the formatting to default, nothing more…

Can you tell me the path to the file, please? I’m looking and can’t find…

I already got it, I looked in the database and there are zero rows in the “PageThemeCustomStyles” table…

Its not a file, its a few database tables. The main tables are CollectionVersionBlockStyles and CollectionVersionAreaStyles. These connect blocks and areas to StyleCustomizerInlineStyleSets. You will need to keep everything consistent between these tables (and perhaps more) without breaking the database. If you are not a database expert, don’t even try it!

Make a database backup first to be sure.

Through the front end, block by block, at the bottom of the block design /cog menu, there is a button to clear all styles for that block (and the same for an area). That button removes entries in the tables and may provide more info on any other tables if you can follow the code through.