Make a package manager
GolfScript, 59 characters
[{;;[]`}:it{|`}:ll{-`}:ve{;$n*}:st];~&quot;#{ARGV*' '}&quot;' '%(-2&gt;~

Implemented the first idea which came into my mind. The database format is simply a GolfScript array representation. Install/remove also handle the case when a program is already installed.
Explanation
# Define four functions for later use ([...]; simply removes them from the stack):
[
  {;;[]`}:it         # init -&gt; discard arguments, discard db, create empty db
  {|`}:ll            # install -&gt; add arguments to db (if not already there)
  {-`}:ve            # remove -&gt; remove all arguments from db
  {;$n*}:st          # list -&gt; discard arguments, sort, join with newline
];

~                    # Parse db given on STDIN
&quot;#{ARGV*' '}&quot;' '%    # Parse command line arguments into array
(-2&gt;                 # Take first argument (command) and the last two chars from it
~                    # Execute that command (i.e. &quot;it&quot; for &quot;init&quot;, ...)