I have been running these commands:

sudo dpkg --clear-selections
sudo dpkg --set-selections < [Path to packages_list ]>
sudo apt-get autoremove

with the file packages_list which looks like this

acpi-support                    install
acpid                       install
adduser                     install
adium-theme-ubuntu              install
adobereader-enu                 install
aisleriot                   install
akonadi-server                  install
alacarte                    install
alsa-base                   install
alsa-utils                  install
anacron                     install

I have been getting these errors while using the second command mentioned above..

dpkg: --set-selections takes no arguments

Type dpkg --help for help about installing and deinstalling packages [*];
Use `dselect' or `aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;
Type dpkg --license for copyright license and lack of warranty (GNU GPL) [*].

Can some one help me out please..


Wherever you copied this from:

sudo dpkg --set-selections < [Path to packages_list ]>

you mangled it and misunderstood the result. I can tell because you have <> arranged like an extra pair of brackets, which if they were actually there in the instructions you found, would be unnecessary (and inconsistently spaced).

It complains that it doesn't take arguments because it takes stdin, You're supposed to use the stdin redirection operator < before your filename. And no > anywhere.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.