Apt-get: non interactive install, search for package, uninstall package

By neokrates, written on May 21, 2010

howto

  • Join date: 11-30-99
  • Posts: 224
View Counter:
  • 272 views
Rate it
Ad
Poll
  • Your favorite way to manage packages is?

    View Results

    Loading ... Loading ...
Feeds:
  • bodytext bodytext bodytext

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.

Software:

✔ Ubuntu *

1

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

2

Find out exact package name

You are not sure, which is the name and version of the package you need.

Use apt-cache search.

Example:

> sudo apt-cache search dbus

 
Now, you can choose from all packages and version the one you need.

3

Uninstall package

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
Be Sociable, Share!
 
Does that help to solve your problem?
VN:F [1.8.5_1061]
Rating: -1 (from 1 vote)
0 votes 'YES'  1 votes 'NO'


TAGS

SOCIAL
Be Sociable, Share!

INCOMING SEARCH TERMS


Leave a Reply