Update PyCharm on Linux

Could you please clarify to me correct way to update PyCharm on Linux?

Is it impossible to update PyCharm internally?

In help > check for update I can just download a new archive.

Should I remove previous folder with PyCharm and unpack new or I should another way for this?


Solution 1:

In-Application Patch Upgrade

From the 2017 versions onward, it is now possible to perform a seamless upgrade without being required to download a tarball. PyCharm will prompt you that an upgrade is available.

If you've installed under /opt, temporarily elevate privileges:

$ sudo chown -R yourusername:root /opt/pycharm_dir/

If selected, PyCharm will upgrade itself, and upon relaunching, should prompt you to import your previous config, file, which is typically found here:

~/.PyCharm201X.X/config

Once you're done, re-apply root privileges

$ sudo chown -R root:root /opt/pycharm_dir/

If Upgrading Using tarball

I recently upgraded from version 2017.2 to 2017.5, and did so using a tarball which I'd previously downloaded. It's also pretty simple:

  1. Extract tarball in preferred location
  2. Delete existing pycharm directory
  3. Launch and import config

The only snag which I found was after the upgrade, my desktop launcher was broken. If you do happen to face this, find the .desktop files, using a tool such locate:

$ sudo updatedb
$ locate *.desktop | grep -i pycharm

Output should be something like:

$ locate *.desktop | grep -i pycharm
/home/yourusername/.gnome/apps/jetbrains-pycharm.desktop
/home/yourusername/.local/share/applications/jetbrains-pycharm.desktop

Edit these lines to the affected .desktop files, if incorrect, to match your PyCharm path:

Icon=/opt/pycharm-201X.X.X/bin/pycharm.png
Exec="/opt/pycharm-201X.X.X/bin/pycharm.sh" %f

Solution 2:

On Linux, you have to delete the old pyCharm directory and start using the new package. There's no other way, at least for now.

When launching the new version you will be asked if you want to import config files. You can find the old config files in a (hidden) directory in your home folder. For example: ~/.PyCharm2016.2/config

Solution 3:

Try to run following from your terminal after going into the pycharm downloaded folder

    sudo ./pycharm.sh 

When you run the above it will ask about the update and also import setting from old version. Please refer to this link :

Stockoverflow link

The solution in the link worked for me.