• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 386
  • Last Modified:

Packages in Ubuntu

I run ubuntu and have the following questions.

If I would like to know what package include a program how do I check that?

How do I install a package
How do I remove a package
How do I update the hole system?
0
Mickeys
Asked:
Mickeys
  • 7
  • 4
  • 2
  • +2
1 Solution
 
Dave BaldwinFixer of ProblemsCommented:
Which version of Ubuntu and are you using a GUI like Gnome or just the command line?
0
 
MickeysAuthor Commented:
latest ubuntu. Command line
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
Dave BaldwinFixer of ProblemsCommented:
The Ubuntu web site directs to http://www.debian.org/doc/manuals/debian-faq/ch-pkgtools.en.html#s-apt-get for the apt instructions (Ubuntu is derived from Debian).  See also 'aptitude' listed below 'apt'.

The GUI version is Synaptic https://help.ubuntu.com/community/SynapticHowto .


0
 
wdfdo1986Commented:
use
sudo apt-get install <package-name>                           to install
apt-get remove <package-name>                                 to install
sudo apt-get update                                                      to update
0
 
wdfdo1986Commented:
to first question search about the program in the internet
That will be easier
0
 
MickeysAuthor Commented:
well that makes me

How do I install a package
How do I remove a package



the other two I dont know and cant find.
Also is it really update for updating the hole system? Isnt that only to update the list of packages?
0
 
MickeysAuthor Commented:
wdfdo1986: well I dont want to search. I want to learn how I do it in ubuntu
0
 
wdfdo1986Commented:
>Also is it really update for updating the hole system? Isnt that only to update the list of packages?
As I remember Yes.

And if u want to know the name of the package consists a certain program either u need to know it or u have to get to know it.
eg: gcc contatins in build-essentials package
So u have to get to know it either by searching in the internet or by reading some documentation of a program or u have to know it from the beginning.
0
 
wdfdo1986Commented:
These may help u
https://help.ubuntu.com/8.04/serverguide/C/apt-get.html
http://www.debian.org/doc/manuals/apt-howto/ch-apt-get.en.html3

And to update use
sudo apt-get update
sudo apt-get dist-upgrade
0
 
MickeysAuthor Commented:
well I am trying to find out what package pdfinfo is in but that I havent been able to get
0
 
MickeysAuthor Commented:
And to update use
sudo apt-get update
sudo apt-get dist-upgrade

What is the diffrence? If I use the first one it just reading the packagelist. But when I use the other it promts to answer Y/n to install a list of packages.
0
 
Jayachandran PalanisamyTechnical Consultant - LinuxCommented:
Hi,
How do I install a package?
You can do this in 3 ways.
Method 1:
a.You can download a .deb package and install.
I.e. download a package as per your OS version/arch from this page.
http://packages.ubuntu.com/

Open in new window

b.Install it thru command line.
dpkg -i packagename.deb

Open in new window

Method 2:
apt-get install package_name

Open in new window

Note: This will install the mentioned package from the OS repository.
Method 3:
a.Download the source package file from Online.
b.Untar the package and install it (typical tar file package installation on all Linux systems and it might vary depends upon the application)
Refer this link : http://askubuntu.com/questions/25961/how-to-install-a-tar-gz-file
tar -xvzf package_name
cd package_name
./configure
make
make install

Open in new window


How do I remove a package?
This can be done thru 3 methods.
Method1:
you can do this manually.
dpkg -r package_name 

Open in new window

(remove the packages) OR
dpkg -P package_name

Open in new window

(purge the pacakges)
Method2:
Simple and best way,
apt-get remove packagename

Open in new window

Method3:
If you installed a package through source package(tar file)
a.remove the installation dir
b.remove the binaries from the paths /bin, /usr/bin, /usr/local/bin and /sbin, /usr/sbin, /usr/local/sbin
c.remove the start/shutdown script from init.d dir
Ref. link: http://manpages.ubuntu.com/manpages/hardy/man8/update-rc.d.8.html

How do I update the whole system?
This command will update your repository/packages as per your OS
apt-get update

Open in new window

This command will upgrade your whole server packages
apt-get upgrade

Open in new window

Note: you should run the both of the commands to upgrade a server.

Jay
0
 
MickeysAuthor Commented:
chandranjoy: That was very good explaining. :-) Thank you very much. That explains it very clearly so I understand.

Then I only have this left.

 I would like to know what package include a program how do I check that?
The package is pdfinfo.

and what is the diffrence between:
sudo apt-get update
sudo apt-get dist-upgrade



0
 
MickeysAuthor Commented:
sorry. One typo:

sudo apt-get upgrade
sudo apt-get dist-upgrade

Diffrence????

0
 
Jayachandran PalanisamyTechnical Consultant - LinuxCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

  • 7
  • 4
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now