If those commands really are "not found", it is a far more serious problem
than not being able to log in the graphical desktop. Nevertheless, I believe
you simply mistyped the command (probably forgetting spaces). Here are again,
the two commands with more spaces than necessary:
$ sudo dpkg --configure -a
$ sudo apt-get -f install
For your information, the first command aims at configuring a package that
would have been unpacked but not configure; the second command aims at fixing
some potentially broken packages. I suggest them because you mentioned that
the cause of all that is a crash of "add/remove programs", which is a
front-end to the package manager.
If the two commands do no not anything interesting, then the problem is
(probably) not to be found there. In this case, you should first read some
logs. For instance, after an unsuccessful attempt to log in (you can switch
back and forth between the graphical session and the terminal by using
Ctrl+Alt+F7 and Ctrl+Alt+F1), is there any novelty in /var/log/syslog. To do
so, you can read the end of this file with:
$ tail /var/log/syslog