OS Manuals

/usr/bin/vacuumdb

PostgreSQL client

From postgresql-17-client 17.10-r1 (os), captured 2026-11-05 by running vacuumdb --help (exit 0). permalink

vacuumdb cleans and analyzes a PostgreSQL database.

Usage:
  vacuumdb [OPTION]... [DBNAME]

Options:
  -a, --all                       vacuum all databases
      --buffer-usage-limit=SIZE   size of ring buffer used for vacuum
  -d, --dbname=DBNAME             database to vacuum
      --disable-page-skipping     disable all page-skipping behavior
  -e, --echo                      show the commands being sent to the server
  -f, --full                      do full vacuuming
  -F, --freeze                    freeze row transaction information
      --force-index-cleanup       always remove index entries that point to dead tuples
  -j, --jobs=NUM                  use this many concurrent connections to vacuum
      --min-mxid-age=MXID_AGE     minimum multixact ID age of tables to vacuum
      --min-xid-age=XID_AGE       minimum transaction ID age of tables to vacuum
      --no-index-cleanup          don't remove index entries that point to dead tuples
      --no-process-main           skip the main relation
      --no-process-toast          skip the TOAST table associated with the table to vacuum
      --no-truncate               don't truncate empty pages at the end of the table
  -n, --schema=SCHEMA             vacuum tables in the specified schema(s) only
  -N, --exclude-schema=SCHEMA     do not vacuum tables in the specified schema(s)
  -P, --parallel=PARALLEL_WORKERS use this many background workers for vacuum, if available
  -q, --quiet                     don't write any messages
      --skip-locked               skip relations that cannot be immediately locked
  -t, --table='TABLE[(COLUMNS)]'  vacuum specific table(s) only
  -v, --verbose                   write a lot of output
  -V, --version                   output version information, then exit
  -z, --analyze                   update optimizer statistics
  -Z, --analyze-only              only update optimizer statistics; no vacuum
      --analyze-in-stages         only update optimizer statistics, in multiple
                                  stages for faster results; no vacuum
  -?, --help                      show this help, then exit

Connection options:
  -h, --host=HOSTNAME       database server host or socket directory
  -p, --port=PORT           database server port
  -U, --username=USERNAME   user name to connect as
  -w, --no-password         never prompt for password
  -W, --password            force password prompt
  --maintenance-db=DBNAME   alternate maintenance database

Read the description of the SQL command VACUUM for details.

Report bugs to <pgsql-bugs@lists.postgresql.org>.
PostgreSQL home page: <https://www.postgresql.org/>
Options (32)
OptionDescriptionSource
-a, --allvacuum all databaseshelp
--buffer-usage-limit SIZEsize of ring buffer used for vacuumhelp
-d, --dbname DBNAMEdatabase to vacuumhelp
--disable-page-skippingdisable all page-skipping behaviorhelp
-e, --echoshow the commands being sent to the serverhelp
-f, --fulldo full vacuuminghelp
-F, --freezefreeze row transaction informationhelp
--force-index-cleanupalways remove index entries that point to dead tupleshelp
-j, --jobs NUMuse this many concurrent connections to vacuumhelp
--min-mxid-age MXID_AGEminimum multixact ID age of tables to vacuumhelp
--min-xid-age XID_AGEminimum transaction ID age of tables to vacuumhelp
--no-index-cleanupdon't remove index entries that point to dead tupleshelp
--no-process-mainskip the main relationhelp
--no-process-toastskip the TOAST table associated with the table to vacuumhelp
--no-truncatedon't truncate empty pages at the end of the tablehelp
-n, --schema SCHEMAvacuum tables in the specified schema(s) onlyhelp
-N, --exclude-schema SCHEMAdo not vacuum tables in the specified schema(s)help
-q, --quietdon't write any messageshelp
--skip-lockedskip relations that cannot be immediately lockedhelp
-t, --table 'TABLE[(COLUMNS)]'vacuum specific table(s) onlyhelp
-v, --verbosewrite a lot of outputhelp
-V, --versionoutput version information, then exithelp
-z, --analyzeupdate optimizer statisticshelp
-Z, --analyze-onlyonly update optimizer statistics;help
--analyze-in-stagesonly update optimizer statistics, in multiple stages for faster results;help
-?, --helpshow this help, then exithelp
-h, --host HOSTNAMEdatabase server host or socket directoryhelp
-p, --port PORTdatabase server porthelp
-U, --username USERNAMEuser name to connect ashelp
-w, --no-passwordnever prompt for passwordhelp
-W, --passwordforce password prompthelp
--maintenance-db DBNAMEalternate maintenance databasehelp

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.