Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to do a clean install of the octave3.2 package.

To do this, I removed it, then tried to reinstall it.

When I reinstalled, an error occurred. It could be a bug in the package, but I want to make sure I have everything removed so that I can do a clean install.

Is it enough to do this?

sudo apt-get --purge remove octave3.2
share|improve this question
    
Could one reinstall the package and pay attention to the package OR dependencies list.. ? –  user309924 Jul 28 at 11:36

3 Answers 3

This is a generic answer to the question about the effects of purging packages generally. For advice specific to your situation, you'll have to edit your question to include additional information--in particular, the complete and exact text of the error message you are getting.

Removing packages with sudo apt-get purge ... or sudo apt-get --purge remove ... will remove them and all their global (i.e., systemwide) configuration files. This is usually what people mean when they talk about completely removing a package.

But that doesn't mean your system is the same as it was before the package was installed. In particular:

  • This does not remove packages that were installed as dependencies, when you installed the package you're now removing. Assuming those packages aren't dependencies of any other packages, and that you haven't marked them as manually installed, you can remove the dependencies with sudo apt-get autoremove or (if you want to delete their systemwide configuration files too) sudo apt-get --purge autoremove.

  • This does not remove non-systemwide configuration files. Specifically, it does not remove user-specific configuration:

    • It does not remove the configuration files and directories located in users' home directories (or in the .config subdirectory of their home directories), created by the software the package provides.

      • If these files/folders are not stored in .config, they usually start with a . themselves. Either way, you can see them with ls by using the -a or -A flag, and you can see them in Nautilus and most other file browsers/managers by pressing Ctrl+H or going to View > Show Hidden Files.
    • It does not reverse changes made to existing user-specific configuration files.

    • It does not remove new gconf or dconf keys, or reverse any gconf or dconf configuration changes.

  • Using purge or --purge remove instead of remove does not reverse changes to existing systemwide configuration files provided by other packages or created manually by the user. However, sometimes such changes are undone by uninstalling the package (whether or not it's a purge rather than a remove).

share|improve this answer

Better keep track of extra dependency packages installed while you are installing one.

The following extra packages will be installed: libgssglue1 libnfsidmap2 libtirpc1 nfs-common rpcbind

If you remove original package only, the dependency package may remain.

So you have to manually remove each one using

apt-get purge

.

share|improve this answer

In the case of a .deb package, do a

sudo dpkg -r name

Here, the name is not the main package name but rather the application name. For example, if you installed viber,

sudo dpkg -i viber.deb

To cleanly remove it, do a,

sudo dpkg -r viber

Depending on how you installed the packages, the clean removal can be done likewise. For APT packages, the above answers explain pretty well. One thing I would like to highlight is that sometimes, trying a clean removal might result in removal of some required packages too, so one needs carefully the dependencies that will be removed too.

share|improve this answer
    
No you are wrong. Using dpkg without proper knowledge may broke package system. Your command will not remove any cfg files. –  totti Jul 18 at 9:07
    
How should I remove a package that I installed in the way I have mentioned above? In the above answer, I wanted to highlight that, sometimes there are some packages listed as no longer needed by the system itself, so we gotta be careful with the autoremove stuff. –  tilaprimera Jul 18 at 9:17
    
dpkg -P will clean all known config file to dpkg. Remove an installed package. -r or --remove remove everything except conffiles. This may avoid having to reconfigure the pack‐ age if it is reinstalled later. –  totti Jul 18 at 9:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.