Pass the key you want to remove as the left argument to the _ (drop) operator, and pass the dictionary as its right argument:

q)dict: `a`b`c ! 1 2 3
q)dict
a| 1
b| 2
c| 3
q)`b _ dict
a| 1
c| 3
q)

If you reverse the order of the arguments, the removal still works:

q)dict _ `b
a| 1
c| 3
q)

Although we can’t think of a good reason to do this, you might come across it. As our commenter Attila pointed out, however, you are more likely to see this overload in its assignment form:

q)dict _: `b / same as dict: dict _ `b
q)dict
a| 1
c| 3
q)

Meanwhile, you can remove multiple keys at once by passing a list of keys as the left argument to _ (drop):

q)`a`c _ dict
b| 2
q)

Reversing the arguments does not work in this case:

q)dict _ `a`c
‘type
q)

Almost. The symbol pool, however, will remain uncleared:

$ rlwrap q
KDB+ 2.7 2011.02.16 Copyright © 1993-2011 Kx Systems
q).Q.gc[]
0j     / as expected, gc is a no-op
q).Q.w[] used| 108432
heap| 67108864
peak| 67108864
wmax| 0
mmap| 0
syms| 538
symw| 15638
q)-1000000?`6    / 1 million symbols of length 6
`milgli`igfbag`kaodhb`bafclb`kfhogj`jecpae`kfmohp`lk..
q).Q.w[] used| 108592
heap| 67108864
peak| 67108864
wmax| 0
mmap| 0
syms| 1000539 / bumped by a million
symw| 31400168
q).Q.gc[]
0j      / no-op again!
q).Q.w[] used| 108592
heap| 67108864
peak| 67108864
wmax| 0
mmap| 0
syms| 1000539 / remains unchanged
symw| 31400168
q)

Typically, it’s used to reinitialize and alert an existing kdb process of a new partition. Note that command triggers the execution of any q scripts existing in the current working directory of the running kdb process.

This command allows kdb to continue running and servicing requests while a new partition is constructed. Running kdb remains unware of the new partition until the \l . command is issued.

See also: .Q.l