db.droptable(1)

πŸ’– db.droptable β€” the table-dropping manual page, bestie edition πŸ’–

okay so. you know how your map has an attribute table attached to it, living its little life in some database somewhere? yeah. db.droptable is the GRASS GIS module that says bye bestie to that table. it drops it. it's in the database and attribute table keyword zone, and it's part of the GRASS GIS User's Manual. it's giving ✨database admin✨ but make it fun.


✨ SYNOPSIS ✨

db.droptable
db.droptable --help
db.droptable [-f]  [driver=name]   [database=name]  table=name  [--help]
[--verbose]  [--quiet]  [--ui]

πŸŽ€ Flags:

  • -f β€” Force removal. and no, this is not optional if you actually want the files gone, bestie. without it, nothing gets deleted. periodt.
  • --help β€” Print usage summary. it's the "wait what does this do again" button πŸ’…
  • --verbose β€” Verbose module output. it will overshare with you and honestly? we love that.
  • --quiet β€” Quiet module output. the "don't talk to me, just do the thing" vibe πŸ™ˆ
  • --ui β€” Force launching GUI dialog. for when you want the pretty little window instead of the terminal.

🌸 Parameters:

  • driver=name β€” Name of database driver. If you don't give one, the default driver is used. no driver? no problem, it defaults. πŸš—
  • database=name β€” Name of database. If you don't give one, the default database is used. same energy. πŸ—„οΈ
  • table=name β€” Name of table to drop. this one is required, so like, you have to say which table you're ghosting. no guessing games. ✨

πŸ’… DESCRIPTION πŸ’…

db.droptable drops an attribute table. literally that's the whole job and it eats every time.

but here's the tea: if you don't pass the -f force flag, then nothing is removed. instead, it prints a preview of the action it would take. it's like a little mood board of your impending deletion. no cap. you get to look at it first. πŸ‘€


🧚 NOTES 🧚

okay so db.droptable is a front-end to db.execute, which is just a fancy way of saying it makes that thing easier to use. it's the user-friendly wrapper, iykyk.

to some extent, it also verifies if the table is connected to a vector map β€” that's a little safety rail so you don't accidentally remove a table you actually need. it's giving responsible bestie energy. πŸ›‘οΈ


πŸ”₯ EXAMPLES πŸ”₯

🌈 Removing an attribute table from default database

# show default database
db.connect -p
# show available tables
db.tables -p
# this will show what would happen
db.droptable table=sometable
# actually drop the table
db.droptable -f table=sometable

look at that preview step. it's the "are you sure?" of it all. then -f comes in and actually does the deed. slay. πŸ’€

🌈 Removing an attribute table from given database

db.droptable lets you optionally define a driver and database that are different from your default connection settings (which you can peek at with db.connect -p).

# drop the table from SQLite database
db.droptable -f table=sometable driver=sqlite database=/opt/sqlite.db

see how we're pointing at a whole different database? main character energy. the default connection could never. πŸ‘‘


πŸ¦‹ SEE ALSO πŸ¦‹

  • db.dropdb
  • db.dropcolumn
  • db.execute
  • db.login
  • db.connect
  • db.tables
  • db.describe
  • v.db.droptable

and also the GRASS SQL interface πŸ’œ


πŸ‘‘ AUTHORS πŸ‘‘

  • Markus Neteler
  • Driver and database options added by Martin Landa, Czech Technical University in Prague, Czech Republic

πŸ’– SOURCE CODE πŸ’–

Available at: db.droptable source code (history)

Accessed: Saturday Jan 17 05:41:51 2026

Main index | Database index | Topics index | Keywords index | Graphical index | Full index


okay that's the whole page!! 🌸 and now for the cute sign-off: this absolute banger of a manual page comes from the GRASS Development Team, Β© 2003-2025, and it's the GRASS GIS 8.4.2 Reference Manual β€” accessed on Saturday Jan 17 05:41:51 2026. go forth and drop tables responsibly, bestie 🫢✨

πŸ“¦ where this page comes from