[home]
bits & pieces
Kubernetes & OpenShift
mac
mobile
music
oracle
programming
tech
web etc.
username:
password:
impressum
Delete all data in a MongoDB collection
by Wolfram Saringer
(2019-02-28)
last change: 2019-03-01
# mongo <dbname>
> use <dbname>
> db.<collection name>.remove({})
> db.repairDatabase()
> db.compact()
Recent articles:
Ho to install SHA-1 support for PostgreSQL
Trivia: Adding Linux Swapspace
Linux Kernel increasingly inefficient
Petabytes
all articles represent the sole opinion of their respective author. all content comes without any warranty for correctnes, despite due diligence.