Is there a way to export all layers of a GPKG (Geopackage) database to shapefiles in ONE STEP? Or just a selection? It's a lot of work to export all layers one by one.
Not a QGIS solution, but very quick using ogr2ogr with the commandline:
ogr2ogr -f "ESRI Shapefile" output_folder input.gpkg
If you want to make it with pythoncode you can use that script from the python console
from osgeo import ogr source = ogr.Open('d:/tonne/workshop1.gpkg',update=False) drv = ogr.GetDriverByName( 'ESRI Shapefile' ) for i in source: LayerName = i.GetName() inlyr = source.GetLayer( LayerName ) outds = drv.CreateDataSource( 'd:/tonne/' + LayerName + '.shp') outlyr = outds.CopyLayer(inlyr,LayerName) del inlyr,outlyr,outds