How do I completely remove an application and its settings?

Asked by Allan Caeg

Every time I uninstall and reinstall an application, its old settings are maintained.

How do I completely remove an application to the point that its old settings will be deleted?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Cesare Tirabassi (norsetto) said :
#1

From the command line:

sudo dpkg -P package_name

Revision history for this message
Cesare Tirabassi (norsetto) said :
#2

Or if you prefer Synaptic (Menu->System->Administration->Synaptic Package Manager) choose "Mark for complete removal" after right clicking on package.

Revision history for this message
Thomas Templin (coastgnu) said :
#3

On Sat, 19. May 2007 17:35:29 wersdaluv wrote:
> New question #6859 on Ubuntu:
> https://answers.launchpad.net/ubuntu/+question/6859
>
> Every time I uninstall and reinstall an application, its old settings are
> maintained.
>
> How do I completely remove an application to the point that its old
> settings will be deleted?

Not only it's old settings also the packages which are installed because of
the packet you deleted.

E.G. A packet A is installed, the packet manager sees that it has a dependency
to packet B and C so it also installs B and C.

If you do a ordinary purge & remove e.g.:
 sudo apt-get --purge remove A
only Packet A and it's config files will be removed.

If packet B and C are not used anymore they can be removed them via:
 sudo apt-get --purge autoremove

Often one desn't know anymore which packets are installed as a dependency of a
certain package. So there is often a situation where two apt-get run's are
needed. But there is a better way...

We can use aptitude for this. Aptitude is a xterm based package manager with
an old fashioned gui as e.g. norton commander. But aptitude can also be used
in pure commandline mode as apt-get.
The benefit of aptitude is it's capability to remove not only the installed
package but also the packets which are installed because packet A depends on
them.

So a command like:
 sudo aptitude purge A
will automatically remove packets B and C.

Aptitude is intelligent enough to see if there isn't another packet, may be D;
which was installed after A, B and C; which also depends on C. In this case
aptitude will only purge A and B but not C because D depends on C.

But al this packet managers don't remove config files if they see that there
are changes which are not done from the package management system. Often an
administrator does some 'fine tuning' on config files or adon e.g. additional
plugins, if the packet management sees this it will not remove the conf
files. E.G. this may be the case for a docuwiki, there are a lot of plugins
which bring new features to dokuwiki. If such a plugin is installed the
packet managers don't remove them.

You will find more information on this in the namual pages of apt-get.
aptitude and the synaptic help menu.
man apt-get
man aptitude
And in aptitude's user manual (which is not part of the ubuntu package even if
aptutude's man page refers to it)
http://people.debian.org/~dburrows/aptitude-doc/en/

regards,
thomas

Revision history for this message
Carlos (caffmx) said :
#4

>So a command like:
 >sudo aptitude purge A
>will automatically remove packets B and C.

This I sure removes the packages, but doesn't remove the settings. I had the same problem when removing Eclipse..

Can you help with this problem?

Provide an answer of your own, or ask Allan Caeg for more information if necessary.

To post a message you must log in.