How to update already installed IntelliJ IDEA on Ubuntu?

24,103

Solution 1

I recommend using Toolbox App for the seamless automatic updates.

If you have upgraded manually, use the Tools | Create Command-line Launcher and Create Desktop Entry to update the old ones.

Solution 2

I also suggest to use ToolBox but in case it is not an option, I just upgraded from IntelliJ 173 to 181 in Ubuntu 16.04 manually and I did it like this.

  1. Download the new IntelliJ version's .tar.gz file from Jetbrains website
  2. Untar the file and put all of its content to the desired location. I put mine in /opt folder for example: sudo tar -zxf ideaIU-2018.1.tar.gz -C /opt
  3. Go inside the new IntelliJ's folder and run the idea.sh script. Example: cd /opt/idea-IU-181.4203.550/bin then ./idea.sh and follow the instructions (select the option to import your settings from your previous Idea's version).

At this moment you have two versions installed but you run the old one when clicking on the Idea icon from the launcher. The problem is that the file (with extension .desktop) that sets up the launcher's icon still points to your old version. You can change that.

The desktop file may be in ~/.local/share/application or /usr/share/applications. Mine was in ~/.local/share/application and its name was jetbrains-idea.desktop.

  1. Edit jetbrains-idea.desktop file with your favorite editor and change the values that need to be changed. In my case I only had to change the values of "Icon" and "Exec" properties. Check the real path from your IntelliJ's installation folder (what we did in point 2 above). Example below of my modified .desktop file:

    [Desktop Entry]
    Version=1.0
    Type=Application
    Name=IntelliJ IDEA Ultimate Edition
    Icon=/opt/idea-IU-181.4203.550/bin/idea.png
    Exec="/opt/idea-IU-181.4203.550/bin/idea.sh" %f
    Comment=The Drive to Develop
    Categories=Development;IDE;
    Terminal=false
    StartupWMClass=jetbrains-idea
    
  2. Save the file and check that its syntax with the command desktop-file-validate pathOfYour.desktopFile (no output means all is fine).

  3. Update your system with the latest changes for .desktop files: sudo update-desktop-database.

  4. Check that the icon from the launcher now launches the new version of IntelliJ. If it does not, log off and log on from Ubuntu. That should do.

  5. You can delete the directory of your previous IntelliJ's version + its hidden directory in your home folder.

  6. You may want to update the values of the executable file /usr/local/bin/idea (if it exists) to point to your new version.

Solution 3

In case anyone still needs an optional solution.

First of all, just install the new version IntelliJ as the first three steps of @Stephane B.'s solution

  1. Download the new IntelliJ version's .tar.gz file from Jetbrains website
  2. Untar the file and put all of its content to the desired location. I put mine in /opt folder for example: sudo tar -zxf ideaIU-2018.1.tar.gz -C /opt
  3. Go inside the new IntelliJ's folder and run the idea.sh script. Example: cd /opt/idea-IU-181.4203.550/bin then ./idea.sh and follow the instructions (select the option to import your settings from your previous Idea's version).

At this moment you have two versions installed but you run the old one when clicking on the Idea icon from the launcher.

To start the new version intelliJ from the launcher:

  1. In the new version IntelliJ, click Configure -> Create Desktop Entry. Now you can start new version from the launcher.

  2. (Optional) You may want to delete the old one. sudo rm -rf /opt/idea-xxx-old-version-xxx

Solution 4

If you are an admin on your system, you are usually in the sudo group

# This will change the group of Intellij folder, subfolders and files to a
# likely existing admin group `sudo` that you will likely be apart of as an admin.
sudo chgrp -R sudo /opt/intellij-idea-community

# Add `+` `w`rite permission for `g`roup for the Intellij folder, subfolders and files
sudo chmod -R g+w /opt/intellij-idea-community

Now you should be able to run the update from the UI (Tested successfully on Ubuntu 14.04).

Share:
24,103
qrius
Author by

qrius

Updated on July 23, 2022

Comments

  • qrius
    qrius almost 2 years

    Currently, I have IntelliJ IDEA 2016.3 installed in my Ubuntu 16.04 for Java programming. I have installed it through the IntelliJ website and not the ppa. Upon launching it, I get an update available notification on bottom right corner and upon clicking update, it opens the IntelliJ IDEA webpage for downloading the latest IDE tar file. I know that in order to install it, I need to download the tar file, untar it inusr/local, and run idea.sh from the bin folder. Even after doing that, when I search for IntelliJ in the Unity Dash, I see the icon for the old 2016.3 version and upon clicking it, it opens the same old version.

    So my question is, how can I update the entire existing IntelliJ platform and see it as the result upon search in the Unity Dash? Can I update it in the same way in which I can update the existing plug-ins and see them in effect upon restarting IntelliJ?