db.dropdb
Removes an existing database.
db.dropdb driver=name database=name [--verbose] [--quiet] [--qq] [--ui]
Example:
db.dropdb driver=sqlite database=name
grass.script.run_command("db.dropdb", driver="sqlite", database, verbose=False, quiet=False, superquiet=False)
Example:
gs.run_command("db.dropdb", driver="sqlite", database="name")
Parameters
driver=name [required]
Name of database driver
Allowed values: dbf, ogr, sqlite
Default: sqlite
database=name [required]
Name of database
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--qq
Very quiet module output
--ui
Force launching GUI dialog
driver : str, required
Name of database driver
Used as: input, dbdriver, name
Allowed values: dbf, ogr, sqlite
Default: sqlite
database : str, required
Name of database
Used as: input, dbname, name
verbose: bool, optional
Verbose module output
Default: False
quiet: bool, optional
Quiet module output
Default: False
superquiet: bool, optional
Very quiet module output
Default: False
DESCRIPTION
db.dropdb removes an existing database using given database driver. Currently only SQLite and PostgreSQL database drivers are supported.
EXAMPLES
Drop (delete) an existing database connected through SQLite driver
Note that the standard GRASS GIS SQLite database is by default found in the user's current mapset. This example shows an out-of-mapset database removal:
db.dropdb driver=sqlite database=/opt/sqlite.db
Drop an existing database connected through PostgreSQL driver
db.dropdb driver=pg database=grassdb
TODO
Support other database drivers, too.
SEE ALSO
db.createdb, db.describe, db.droptable, db.execute, db.login, db.tables
AUTHORS
Radim Blazek, ITC-Irst, Trento, Italy
SQLite and PostgreSQL support by Martin Landa, Czech Technical
University in Prague, Czech Republic
SOURCE CODE
Available at: db.dropdb source code
(history)
Latest change: Friday Feb 07 19:16:09 2025 in commit a82a39f