I wish to clean lines with some attibutes like
I use v.clean in QGIS for snapping. Is there a way (QGIS, GRASS, Postgis, Spatialite) that snaps the green line on the red line?
Both QGIS and GRASS GIS offer a graphical vector digitizer. In addition, GRASS GIS offers a dedicated tool for vector editing (v.edit).
If it is a one-time only operation, it will be easier to interactively snap the line (snapping function in the aforementioned digitizers).