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 installed nmap from the Software Center and their version is 5.21. After this, I downloaded the latest version that is 6.01 but I haven't installed it yet.

What I should do and why?

  • Uninstall the currently installed version and then install the new version. Or..
  • Even with an older version installed, install the new one over this.

Is this applicable to upgrading any software packages on Ubuntu or it doesn't?

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

Trouble is: if you install the new version from source (instead from a package), the packaging system is not involved. This is no problem if you make sure to install it in a different location (using PREFIX=/usr/local in this case with ./configure). You could chose so if you want to use both versions in parallel.

A different approach would be replacing the installed version. But for this you need a .deb package. Again not a real big deal: there's a package called checkinstall in the Ubuntu repos. Instead of the triplet ./configure && make && make install you simply use ./configure && make && checkinstall. You will then be asked a couple of questions for the package (make sure to give it the same name as the installed one -- in your case nmap, and specify the correct version info -- everything else is rather optional), then checkinstall creates a .deb and installs it. This way, if there's a new version available via the repos, you will be able to update easily -- as the packaging system was kept involved.

You can read more on checkinstall on its Homepage, or find more detailed instructions in the Community Ubuntu Documentation.

share|improve this answer
add comment

When you chose install, the Software Center will replace the current version with the newer version, i.e. upgrade to the newer version.

By just upgrading, you will be more likely to keep any custom settings you have. The only way I would uninstall first is if I thought I might have some bad settings that are stopping the program from running properly and wanted to do the quick and dirty fix instead of tracking down the incorrect setting.. However the only way to reliably wipe all you old settings it to run

apt-get purge {application name}

and to the final part of your question, this applies to just about any application I can think of. I have even upgraded my network manager while online and then continued to stay online(the old version continues to be used until the program is restarted, in the NM case that is reboot unless you force it to stop and start manually.

share|improve this answer
    
Are you bearing in mind that I'm installing the new version from the source in the terminal? I'm not using the Software Center. –  Lucio Jul 7 '12 at 4:42
1  
The way your question was worded I was not aware of that. If you are doing a /make then there could likely be 2 versions installed, then I guess conflicts are possible. If I understand, you have 5.21 installed via the software center and you are installing 6.01 via /make install..if that is the case then you would likely want to uninstall 5.21 first to avoid any possible conflicts. –  TrailRider Jul 7 '12 at 6:46
add comment

Uninstall the version 5.21 currently installed and then install the new 6.01 version fresh. If it is a .deb file, double click on it and Software Center will take it from there. Software Center may reject a non-repo source if there is a repo source application already installed. In rare instances, the software may be installed separately, resulting in two versions of the same software installed on the same computer. In any case, removal of the old package and installation of the new package is recommended, not required.

Does that answer the question that you implied but wrote incorrectly?

share|improve this answer
    
That it's not a correct answer. What I wanna Is the reason of why choose -install over- or -uninstall & install-. I already know how to install. –  Lucio Jul 7 '12 at 2:36
    
Your question was "What should I do?", not "Why would I do?". I have had instances of two versions of the same software (one repo, one not) install as if they were two different applications. Uninstall has been the cleaner route for me since. –  xlukasx Jul 7 '12 at 4:05
add comment

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.