UCFQ(1)

๐Ÿ’– UCFQ โ€” the ucf database query bestie ๐Ÿ’–

okay so you opened the User Commands manual for ucfq (that's section 1, iykyk) and bestie you are in the RIGHT place. this lil script queries the ucf database. that's it. that's the vibe. โœจ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

usage: ucfq [options] /path/file.conf|package...

โœจ OPTIONS โœจ

  • --help, -h โ€” prints out a usage message. she's helpful like that ๐Ÿซถ
  • --version, -V โ€” prints the version. receipts, but make it software ๐Ÿ’…
  • --debug, -d โ€” turns on debugging mode. chaos mode but make it diagnostic ๐Ÿ”ฅ
  • --verbose, -v โ€” makes the script more verbose. she will NOT stop talking (affectionate) ๐Ÿ˜ญ
  • --with-colons, -w โ€” normally the script gives you the info in a human-readable tabular format, but ngl that's harder for a machine to parse. with this flag you get a compact, colon-separated line instead, with no dividers, no headers, no footer. strictly business, zero small talk ๐ŸŒˆ
  • --state-dir dir โ€” sets the state directory to "/path/to/dir" instead of the default "/var/lib/ucf". used mostly for testing, so likeโ€ฆ bestie don't casually repoint this on a real system ๐Ÿ‘€
  • --root dir โ€” sets the root directory. it defaults to the value of the "\$DPKG_ROOT" environment variable, or to "/" otherwise. ๐ŸŒ

๐Ÿ‘‘ DESCRIPTION ๐Ÿ‘‘

this script takes a set of arguments โ€” each one is either a package name (and therefore does not contain a /) or a full path to a configuration file โ€” and it outputs the associated package, if any, if the file exists on disk, plus whether the user has modified it. so: what is this file, and did you touch it? ๐Ÿ•ต๏ธโ€โ™€๏ธ

the output comes in one of two flavours: the human-readable tabular form, or the compact colon-separated machine-friendly format. pick your fighter ๐Ÿ’…

you can use this script in package postrm scripts during purge, to query the system for configuration files that may still be hanging around on it, and to find out whether those files have been locally modified by the user โ€” assuming the package registered all its configuration files with ucf using ucfr. that last part is load-bearing, fr fr: no registration, no answers. ๐ŸŽ€


๐Ÿงš AUTHORS ๐Ÿงš

  • Manoj Srivastava <srivasta@debian.org>
  • Mark Hindley <leepen@debian.org>

stan the maintainers, they did that. ๐Ÿ’œ


this script is a part of the Ucf package, and it is:

Copyright (c) 2006 Manoj Srivastava <srivasta@debian.org>
Copyright (c) 2024 Mark Hindley <leepen@debian.org>

This program is free software; you can redistribute it and / or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ๐Ÿซ 

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


๐Ÿฆ‹ SEE ALSO ๐Ÿฆ‹


lowkey the whole point: ucfq reads the ucf records, ucfr is what registers them. go read both, bestie, the trio only makes sense together. ๐Ÿ“

and that's the page!! this one shipped out of Debian on 2026-06-25, so if you're reading it way later, hi, you're valid, go check for updates. mwah ๐Ÿ’–๐Ÿ‘‘โœจ

๐Ÿ“ฆ where this page comes from