Apt-get: non interactive install, search for package, uninstall packageBy neokrates, written on May 21, 2010
Apt-get would often require interaction, expect you to say “yes” or “no”. Not good for scripts. In most cases easy to avoid. Some more useful apt-get’s examples.
✔ Ubuntu *
Non interactive install
Use apt-get –force-yes –yes.
For example get xulrunner-1.9, apt-get asks no questions:
> sudo apt-get --force-yes --yes install xulrunner-1.9
Find out exact package name
You are not sure, which is the name and version of the package you need.
Use apt-cache search.
> sudo apt-cache search dbus
Now, you can choose from all packages and version the one you need.
apt-get remove removes the package itself:
> sudo apt-get remove xulrunner-1.9
apt-get remove will also remove the ‘unused dependencies’.
⚠Warning: In my experience some of the dependencies that Unix sees as unused might be still needed.
💡 Remark: Not in each distro, i.e. on Ubuntu, up Ubuntu Edgy Eft (6.10)
> apt-get autoremove xulrunner-1.9
INCOMING SEARCH TERMS