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.


What gets cleaned up

Uninstalling the Admin Portal leaves two of the three data stores behind. Clean those up manually.

Data store Removed on uninstall? Where it lives
LocalDB database No — remove it manually (Step 1) The MSSQLLocalDB instance, plus the database files in C:\Windows\System32\config\systemprofile
Files on the file system No — remove them manually (Step 2) C:\Storage
MongoDB database Yes — removed automatically during uninstallation Nothing to do

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.


Quick start

Experienced administrators complete the cleanup in 5 steps:

  1. Stop the CD Platform Host service.
  2. Delete the MSSQLLocalDB instance with sqllocaldb, run through PSExec.
  3. Delete the two SmartSupplyAdministration database files.
  4. Delete the C:\Storage folder.
  5. Start the CD Platform Host service again.

Need more detail? Follow the full steps below.


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.


Next steps

  1. Reinstall the Admin Portal — the server is now clean, so continue with How to install on-premise.
  2. Keep the old data instead — if you need the previous data back rather than a fresh start, follow How to restore on-premise data.

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.
C:\Storage cannot be deleted because it is in use CD Platform services are still running and holding the files Stop the CD Platform services first, then delete the folder (Step 2).
The MongoDB data is still on the server The Admin Portal has not been uninstalled yet MongoDB is removed automatically during uninstallation — no manual cleanup is needed.

Was this article helpful?

Related Articles