LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-16-2011, 05:01 AM   #1
coolx
LQ Newbie
 
Registered: Aug 2011
Posts: 19

Rep: Reputation: Disabled
What are the differencies between dpkg and apt-get uninstall


Hello everyone,
I just dont understand how programs are uninstalling on Linux(Ubuntu). What are differencies between these 2 commands? How may I sure if apache uninstalled from system?

dpkg -P apache2
apt-get uninstall apache2
apt-get purge apache2
 
Old 08-16-2011, 06:09 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Do you mean?
Code:
apt-get remove apache2
remove just removes the program; purge removes not only the program but all the configuration files created by using this program. Personally, I only use dpkg for installing individual deb files I have downloaded from non-repository sources.
To find out if apache2 is still installed you can try
Code:
dpkg --get-selections | grep apache2
If you see nothing then the package has been purged. If you see deinstall then the package was removed but not purged. If you see install then the package is still installed.
ciao,
jdk

Last edited by jdkaye; 08-16-2011 at 06:10 AM.
 
1 members found this post helpful.
Old 08-16-2011, 06:33 AM   #3
coolx
LQ Newbie
 
Registered: Aug 2011
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by jdkaye View Post
Do you mean?
Code:
apt-get remove apache2
remove just removes the program; purge removes not only the program but all the configuration files created by using this program. Personally, I only use dpkg for installing individual deb files I have downloaded from non-repository sources.
To find out if apache2 is still installed you can try
Code:
dpkg --get-selections | grep apache2
If you see nothing then the package has been purged. If you see deinstall then the package was removed but not purged. If you see install then the package is still installed.
ciao,
jdk
Thanks for your reply jdkaye, but I still dont know the differencies. You mean, If I install a program using "dpkg", I cant use "apt-get remove program" command? or reverse?

Secondly, recently download a program. There is no .deb file. Which file is setup file like in windows? Or should I use a command? I add the screenshot the files as attach.
Attached Thumbnails
Click image for larger version

Name:	Capture2.PNG
Views:	8
Size:	60.4 KB
ID:	7810  
 
Old 08-16-2011, 07:21 AM   #4
DavidMcCann
Senior Member
 
Registered: Jul 2006
Location: London
Distribution: CentOS, Salix
Posts: 4,165

Rep: Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223Reputation: 1223
Try reading the manual:
man apt-get
man dpkg
Normally, apt-get is the tool you use because it works with the repository. dpkg is normally just for .deb files you've got from somewhere else. Even if a package was installed with dpkg, apt-get can still remove it.

What you've downloaded here is the source code for a program. For explanations, read the README and INSTALL files. These should tell you if there are any special dependencies you need to get, how to install, and how to use it. Basically, the procedure is to use the commands
cd directory_containing_the_code
./configure
make
sudo make install
That's it!
 
1 members found this post helpful.
Old 08-16-2011, 12:09 PM   #5
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
If you follow David's suggestion you can still get your compiled program into the package system. After executing ./configure and make replace the sudo make install command by
Code:
sudo checkinstall -D
This will create and install a deb package of your compiled program. You can then remove it in the usual way. I think you need to have kept the .deb file that you installed with dpkg in order to remove it. As both David and I have said, you don't normally use dpkg to install packages.
ciao,
jdk
 
Old 08-16-2011, 01:27 PM   #6
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
dpkg is the base program for manipulating .deb packages. It will install or uninstall a single package.

apt provides a broader framework for maintaining the packages installed on your system. It interfaces with the online repository, takes care of updates and upgrades, handles dependencies and conflicts, and so on. apt calls on dpkg to do the actual work of installing/uninstalling packages.

Above that are the broader package-handling programs like the cli aptitude and the gui synaptic, which attempt to provide a more user-friendly interface for the apt/dpkg subsystem.

Programs not in .deb form can't be directly handled by any of the above. But if you compile something yourself from a source package, then you can use checkinstall, as mentioned above, to package it up before install.

If you have an redhat-style .rpm package, or a slackware .tgz, then you can try to convert it to .deb using alien. This may make it installable, but it won't guarantee that the program will work, as it was compiled for a different target system.

Finally, some programs, like Firefox, are distributed in binary form, but use their own customized install scripts instead of any of the standard packaging systems. There's usually little you can do to integrate these into the rest of the system, and you can only use them as stand-alone exceptions.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
APT/dpkg errors! /var/lib/dpkg/status bassclarinet Debian 16 12-01-2011 10:24 AM
[SOLVED] DPKG/apt-get broken - GLIBC_2.6 not found (required by dpkg) Alize Linux - Software 15 05-23-2011 05:25 AM
apt-get dpkg error 5%dpkg akhund_bilal Debian 15 02-10-2010 07:13 AM
PHP differencies cccc Debian 11 02-23-2009 05:41 AM


All times are GMT -5. The time now is 08:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration