Update PyCharm on Linux

emedentsii picture emedentsii · Apr 23, 2014 · Viewed 41.8k times · Source

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?

Answer

jonathan picture jonathan · Jul 28, 2017

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