1. Home
  2. Knowledge Base
  3. Account and security
  4. How to clean up on-premise data

How to clean up on-premise data

Read time: ~3 minutes

Applies to: Admin Portal · On-premise only


What you can do

Remove leftover LocalDB databases and storage files after uninstalling the CRIBWISE Admin Portal so you can start fresh on a reinstall or upgrade.


Before you start

  • You have administrator access to the Windows server hosting the Admin Portal.
  • The Admin Portal is still installed (required for LocalDB cleanup) — or you plan to reinstall it first.
  • You have downloaded PSExec from Microsoft.

Important: The LocalDB database and files on the file system are not removed when uninstalling the Admin Portal. You must clean them up manually if you want a fresh installation. The MongoDB database is removed automatically during uninstallation.


Steps

Step 1 — Clean up LocalDB

The following steps require SQL LocalDB to be installed. Perform them while the Admin Portal is installed (either before uninstallation or after a fresh installation).

  1. Stop the CD Platform Host service.
  2. Open a command prompt as administrator and run: psexec -i -s cmd.exe
  3. In the newly opened command prompt, stop the LocalDB instance:
    sqllocaldb p MSSQLLocalDB
  4. Delete the LocalDB instance:
    sqllocaldb d MSSQLLocalDB
  5. Navigate to C:\Windows\System32\config\systemprofile and delete these files:
    • SmartSupplyAdministration.mdf
    • SmartSupplyAdministration_log.ldf
  6. Start the CD Platform Host service (or restart the computer).

Note: Starting the Admin Portal services will take longer than usual due to the creation of new databases.

Tip: As an alternative, uninstall the Admin Portal and perform a fresh installation to change the customer or brand.

Step 2 — Clean up the file system

  1. Stop CD Platform services (if still installed and running).
  2. Delete the folder C:\Storage.

Success: All customer data has been removed. You can now perform a fresh installation.


Troubleshooting

Problem Likely cause Fix
sqllocaldb command not found SQL LocalDB is not installed or not on PATH Reinstall the Admin Portal first, which installs LocalDB, then retry.
Cannot delete .mdf/.ldf files LocalDB instance is still running Ensure you ran sqllocaldb p MSSQLLocalDB and sqllocaldb d MSSQLLocalDB first.
Services take very long to start after cleanup New databases are being created from scratch This is expected on first start. Wait for the process to complete.

Was this article helpful?

Related Articles