Ubuntu : Installing, Removing, and Searching for Packages & Apps from Terminal

Contributor Icon Contributed by Jimmy Selix  
Tag Icon Tagged: Linux  

This is a quickie on how install, uninstall, and search for applications/packages in Ubuntu Linux from the Terminal window.


Searching for Packages / Applications from Terminal

1. Open the Terminal window (Applications > Accessories > Terminal).

2. at the commandline, type:
apt-cache search xxyyzz

xxyyzz being the full or partial name of the package/application

Installing Packages / Applications from Terminal

1. Open the Terminal window.

2. at the commandline, type:

sudo apt-get install xxxxxxx
(xxxxxx = name of pacakge to install, ie wacom-tools )

you will then be prompted for your password or the admin password; enter it and hit enter.

3. the terminal session will now go and check the source locations for the package, if it exists, it will then download and install it. If its already installed, it will give a message saying 0 installed 1 already installed type of message.

4. type:
exit
reboot to be sure that the package/application was installed properly.

Uninstalling Packages / Applications from Terminal

1. Open the Terminal window.

2. at the commandline, type:

sudo apt-get remove xxxxxxx
(xxxxxx = name of pacakge to remove, ie wacom-tools )

you will then be prompted for your password or the admin password; enter it and hit enter.

3. Once it finishes, type:
exit

NOTES

this method is identical to using the Synaptics Package Manager utility, the terminal method is nice for when you know the exact name of the packages you want to install.

for example if you get an error saying your missing xyz package; you can just open up terminal and do the apt-get command.

sudo = su “do” (in other words, run as superuser the following command, in Windows it would be using the “Run As” command)

type: man apt-get
this will bring up a help/readme type window in terminal explaining what flags can be used w/the command.

 

5 Comments -


  1. jim said on October 7, 2008

    awesome! the more I learn and use the terminal the more it kicks the @$$ of the GUI

  2. Anonymous said on May 7, 2010

    I have a program in windows7 that prevents me from logging into windows, so I am using ubuntu cd to log in.I would like to uninstall this program called ayrecovery but i don’t see how to from ubuntu.

    If it’s not possible to uninstall it would it work to rename it just to log into windows then deal with the program?

  3. Hazique Quazi said on November 14, 2010

    i typed the command sudo apt-get install thunderbird. it asked for password. but wen the password nothing gets written on screen. it feels as if the keyboard doesn’t works. when i hit enter a message gets displayed- sorry try again. i’m using ubuntu 10.10.

  4. Emails said on December 2, 2010

    Hi Hazique,

    Just try to type ur password without mistake ex: ur password id “enter” then only use five char’s exactly “enter”.
    In terminal u can’t see anything typing over screen! Don’t worry… just type correct password!

    Try it! – Cheers!

  5. Moroluce said on February 3, 2011

    sorry, but when I type my password, it also says “sorry try again”
    why does it not recognize my password.
    I know nothing is supposed to be seen, but still, no I’m worried; won’t I ever get the chance to install something?

 

RSS feed for comments on this post. TrackBack URL

Leave a comment -