Before downgrading the binaries, you must downgrade the feature
compatibility version and remove any 4.0 features
incompatible with 3.6
versions as outlined below. These steps are necessary only if
featureCompatibilityVersion has ever been set to "4.0".

The setFeatureCompatibilityVersion command performs writes
to an internal system collection and is idempotent. If for any reason
the command does not complete successfully, retry the command on the
mongod instance.

Remove all persisted features that are incompatible with 3.6. For example, if you have defined
any view definitions, document validators, and partial index filters
that use 4.0 query features such as the aggregation convert
operators, you must remove them.

If you have users with only SCRAM-SHA-256 credentials, you should
create SCRAM-SHA-1 credentials for these users before downgrading.
To update a user who only has SCRAM-SHA-256 credentials, run
db.updateUser() with mechanisms set to SCRAM-SHA-1
only and the pwd set to the password:

Using either a package manager or a manual download, get the latest
release in the 3.6 series. If using a package manager, add a new
repository for the 3.6 binaries, then perform the actual downgrade
process.

Once upgraded to 4.0, if you need to downgrade, we recommend downgrading to the latest patch release of 3.6.