Directly on my Debian box, I can run the following command to show manually installed packages:
aptitude search '!~M ~i'
This works great. If I SSH in from a remote box, and run the command, I also get the same result.
However, when I run the command as a batch, it does not produce the same result.
ssh user@server aptitude search '!~M ~i'
Since the process takes a bit of time to run, I execute ps aux | grep aptitude
while running both variants, and the result appears to be the same.
What am I doing wrong?
PS. I am aware that dpkg -L can produce this information, but this is just the smallest example of what is broken, I intend to use !~pstandard !~pimportant !~prequired
to filter out base packages as well, which I don't believe dpkg can do (but if it can, a solution with dpkg is welcome.)