g.remove(1)
π g.remove β the GRASS GIS manual page, bestie edition π
okay so this is g.remove(1), straight out of the GRASS GIS User's Manual. yes it's a manual page. no it's not boring. sit down, hydrate, let's go π«Ά
β¨ NAME β¨
g.remove β removes data base element files from the user's current mapset using the search pattern. that's it, that's the whole job, and it does it flawlessly π
π·οΈ KEYWORDS π·οΈ
general, map management, remove
π SYNOPSIS π
g.remove
g.remove --help
g.remove [-irefb] type=datatype[,datatype,...]
[ignore=string[,string,...]]
[pattern=string] [exclude=string] [--help] [--verbose] [--quiet]
[--ui]
πΈ Flags πΈ
-iβ ignore case. capital letters? lowercase letters? it does not care, it's above such things π-rβ use basic regular expressions instead of wildcards-eβ use extended regular expressions instead of wildcards-fβ force removal. and bestie, this one is the real one: it's required for actual deletion of files. no-f, no delete. periodt.-bβ remove base raster maps--helpβ print usage summary--verboseβ verbose module output--quietβ quiet module output--uiβ force launching GUI dialog
π§ Parameters π§
type=datatype[,datatype,...]β [required] the data type(s) you're coming for.- Options:
raster,raster_3d,vector,label,region,group,all raster: raster map(s)raster_3d: 3D raster map(s)vector: vector map(s)label: paint label file(s)region: region definition(s)group: imagery group(s)all: all types
- Options:
name=string[,string,...]β name of file(s) to removeignore=string[,string,...]β name of file(s) to ignore (default: none)pattern=stringβ file name search patternexclude=stringβ file name exclusion pattern (default: none)
π DESCRIPTION π
so g.remove removes data files matching a pattern, and that pattern can be either wildcards or POSIX Extended Regular Expressions. you pick your fighter π₯
and here's the plot twist: if you do not pass the -f force flag, nothing gets removed. instead the list of selected file names gets printed to stdout as a preview of the files that would be deleted. it's giving window shopping. it's giving "let me think about it". iconic behaviour tbh π
π₯ EXAMPLES π₯
Delete map1 and map2 raster maps in the current mapset:
g.remove -f type=raster name=tmp1,tmp2
Delete all raster and vector maps starting with "tmp_" in the current mapset:
# show matching raster and vector maps but do not delete yet (as verification)
g.remove type=raster,vector pattern="tmp_*"
# actually delete the matching raster and vector maps
g.remove -f type=raster,vector pattern="tmp_*"
Delete all vector maps starting with "stream_" in the current mapset, but exclude those ending with "_final":
g.remove -f type=vector pattern="stream_*" exclude="*_final"
π AUTHOR π
Huidae Cho grass4u@gmail.com
β SOURCE CODE β
Available at: g.remove source code (history)
Accessed: Saturday Jan 17 05:40:40 2026
Main index | General index | Topics index | Keywords index | Graphical index | Full index
okay and for the cute sign-off π β this whole thing lives under the GRASS GIS 8.4.2 Reference Manual, Β© 2003-2025 GRASS Development Team, and yeah the version stamp says GRASS 8.4.2 with g.remove(1) chillin' at the bottom. now go forth and delete responsibly, bestie, and remember: no -f, no files gone πβ¨π¦
π¦ where this page comes from
- fedora 44: grass 8.4.2-4.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms