Cleanup

After unsuccessful attempts you might want to cleanup the various accounts to avoid confusion.

If you're still trying to deploy your first Nightscout, ignore all data loss recommendations below.

If you have a large amount of CGM data, be extra cautious when performing Atlas cleanup.


Github

Github cleanup consists of deleting your fork and forking again the official latest released version.

Follow Step 1 of this guide (ONLY STEP1!).


Heroku

If you experience issues during deployment you might end up with many apps. Make sure you keep the last one that was functional or delete all before attempting a new deployment. This will just make it easier to find which app you're trying to build. Keeping sleeping apps doesn't have any negative impact but no real advantage unless you do it on purpose.

Deleting an Heroku app does not delete your Nightscout data, but you might want to write down your variables if your site was functional before. Note you can also rename an app (unless the name is already in use in heroku.com).

To delete an app, select it and go to Settings, scroll down to Delete App

Copy and paste your app name to confirm deletion,


Atlas

It is very easy to get lost in Atlas.

The structure from top to bottom is: Organization, Projects and Databases. You can have several organizations, each of them several projects and each of them several databases.

Note

If you are deploying a brand new Nightscout make sure you have one organization, one project and one cluster created. No more no less.

If you want to cleanup Atlas, unless you don't have data, you must first find out which database contains your data. For this, start from View All Organizations:

You can delete empty organizations (those without any project inside).

Select the organization, then top left the cog wheel to go in Settings, then scroll down to Delete Organization: Delete.

If an organization is connected to mLab delete it only if you don't want to migrate the database or if you're done it with another organization. Deleting an organization without projects will not delete your data.


Once inside an organization, you will see its projects. You can safely delete projects without clusters.

Deleting an empty project doesn't delete your Nightscout data.

For non-empty projects continue reading before deciding to delete them.


You can then move to your project (select it) and check its database(s) selecting COLLECTIONS

An empty project will look like below, and this is typically what you have before deploying Nightscout in Heroku. Once Nightscout is deployed in a project, a new database will be created there.

The database currently used by your Nightscout is the one specified in the connection string, in the example below dbname. Whenever you change the database name in the connection string, a new database will be created in your project.

mongodb+srv://atlasusername:atlaspassword@cluster0.zzzzz.mongodb.net/dbname?retryWrites=true&w=majority

There is usually one database for Nightscout, if there are several, select one and then the other(s) to understand which one contains your data. For this, select entries.

A large database is most probably one you want to keep.

You can safely delete empty databases (check the size first).

If you're not sure you're deleting the right database, just leave it.

Hover on the database name and click the bin icon. Confirm deletion by copying the database name and click Drop.

If your database gets recreated after you deleted it this means you MONGODB_URI or MONGO_CONNECTION string is pointing to it.


If you want to delete a non-empty Project you need to terminate all clusters belonging to it.

Terminating a cluster will delete all information and databases in this cluster!

Confirm with your cluster name and wait until shutdown is complete.

You can then delete the empty project.