You can now clean up your custom themes in v1.11.0 of the enterprise portal. The themes page displays the option to remove (soft delete) your themes and prevent them from showing in the UI or REST API result, however, please note that the themes are still kept in the database.
You can also use our Enterprise Portal REST API to soft delete the theme based on their IDs
DELETE /portal-api/themes/<THEME_ID>
For versions older than v1.11.0, direct deletion from the configured storage option is the alternative
- delete the theme directly from the directory specified if
PORTAL_STORAGE=fs
- delete the theme from the db with the help SQL query if
PORTAL_STORAGE=db
- delete the theme from the s3 storage if
PORTAL_STORAGE=s3
Database query for deleting a theme manually
The assets are stored in the assets
table within the DB. So to delete the theme, the following query can be run
DELETE FROM assets
WHERE path LIKE '/opt/portal/themes/<theme_name>%';
This query deletes all rows where the path column starts with /opt/portal/themes/<theme_name>
. The %
wildcard allows for any characters to follow the specified path, ensuring that both the exact path and any sub-paths are included. Be cautious when executing this query, as it will permanently remove the matching rows from the table.
Please note that a portal restart may be required for the outcome/result of the deletion to reflect.
Comments
0 comments
Please sign in to leave a comment.