Update PyCharm on Linux
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:
- Extract tarball in preferred location
- Delete existing pycharm directory
- 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 :
The solution in the link worked for me.
Solution 4
When PyCharm won't let you update due to missing privileges, you can temporarily add read and write privileges for other users to the PyCharm directory and its contents or change the owner of your PyCharm directory if every file already has read and write privileges for the file owner.
Assuming you've installed PyCharm in /opt/pycharm-professional like this:
drwxr-xr-x 10 root root 4096 May 11 17:12 pycharm-professional
This would be a away to accomplish it:
-
Set the owner
$ sudo chown -R yourusername:root /opt/pycharm-professional
-
Start PyCharm
$ sh /opt/pycharm-professional/bin/pycharm.sh
Press Alt + H and Alt + C to check for updates and apply them.
-
Close PyCharm and don't forget to reset the ownership!
$ sudo chown -R root:root /opt/pycharm-professional
Solution 5
I'll be updating from PyCharm Community 4.0.6 installed at ~/Environment/
to PyCharm Community 4.5 on Fedora 21. Change directories, release names, and version numbers to match your situation.
Adapted from the PyCharm download page install instructions:
Update
Copy the pycharm-*.tar.gz to the current PyCharm installation location
(make sure you have rw permissions for that directory, mine is in ~/Environment/
):
[you@localhost Downloads]$ mv pycharm-community-4.5.tar.gz ~/Environment/
[you@localhost Downloads]$ cd ~/Environment/
[you@localhost Environment]$ ls
pycharm-community-4.0.6 pycharm-community-4.5.tar.gz
Remove the old PyCharm installation:
[you@localhost Environment]$ rm -rf pycharm-community-4.0.6/
[you@localhost Environment]$ ls
pycharm-community-4.5.tar.gz
Unpack the pycharm-*.tar.gz:
[you@localhost Environment]$ tar xfz pycharm-*.tar.gz
[you@localhost Environment]$ ls
pycharm-community-4.5 pycharm-community-4.5.tar.gz
Remove the pycharm-*.tar.gz to save disk space (optional):
[you@localhost Environment]$ rm pycharm-*.tar.gz
[you@localhost Environment]$ ls
pycharm-community-4.5
Run
PyCharm on Linux doesn't need special installation or running any installation script. You should now be able to run PyCharm:
[you@localhost Environment]$ sh pycharm-community-4.5/bin/pycharm.sh
Mine fired right up, opened my projects, files, and settings just like they were before.
Maintenance
Once you've started PyCharm, you can recreate your desktop entry with a couple clicks.
There is likely a ~/.PyCharm40/
or ~/.PyCharm30/
directory in your home directory. I didn't need to change this.
emedentsii
Software QA, python enthusiast and big Linux fan =)
Updated on October 24, 2020Comments
-
emedentsii over 3 years
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?
-
Danny Staple almost 10 yearsIs there no way to preserve previous app settings and plugins? Any files that should be excluded or copied out and back in?
-
Danny Staple almost 10 yearsIt looks like much of these are in ~/.Pycharm30 - which should be fine. This is the right way.
-
kdbanman almost 9 yearsThis is pretty disappointing. PyCharm and every other JetBrains product I've used are remarkably feature complete and easy to use. This delete-and-reinstall update method is remarkably clunky. Maybe @CrazyCoder could offer some insight.
-
kdbanman over 7 yearsVery glad this works now!
apt-get
is definitely my preferred way of installing most things. Note that this will only update pycharm if it was originally installed throughapt-get
. Otherwise this will just install a second copy. -
ssoto almost 7 yearsSorry but this is not correct. Pycharm tar.gz file has an
Install-Linux-tar.txt
where an explanation is gived about how tu update between versions. -
Animesh almost 7 yearsThis is now available in current versions (2017.x). I have the current community edition and it updates automatically. Very painless.
-
Adrian W almost 7 yearsDidn't work for me. Checking for updates as described will just offer a "Download" button which sends you to JetBrain's download page, which will bring you a plain .tar.gz and nothing else.
-
Adrian W almost 7 yearsAt least with recent versions of PyCharm, this is not necessary. Just extract the new version, start it and it will automatically ask to import the settings and will even propose the location of the previous version's settings as default.
-
cwhisperer over 6 years@ssoto was right: delete old pycharm folder, unpack new downloaded pycharm. Go into bin/ folder and run ./pyCharm.sh. Previous settings are detected and installed. That's all!
-
Scott Smith over 6 yearsMake that:
sudo chown -R yourusername:root /opt/pycharm_dir/
(trailing slash is important) -
Carlos A. Jimenez Holmquist about 6 yearsomg this had been bugging me for a while now, 'couse I had a 2016 version and wanted to update to the newest one, but always lost my desktop launcher, thank you!
-
ITA about 6 yearsWhat do you do after
sudo chown -R yourusername:root /opt/pycharm_dir/
? -
jonathan about 6 yearsUpgrade from within Pycharm for newer releases, or download the tarball and upgrade from there, then follow the additional steps I've listed here.
-
Adrian W over 5 yearsIf I choose "Help" -> "Check for updates..." in PyCharm 2018.2, it offers only the options "Download", "Release notes", "Ignore this update" and "Remind me later". "Download" opens the browser for Jetbrain's download page. I don't see any means for upgrading in-application. And yes, the permissions of
/opt/pycharm-2018.2
are set according to your answer. -
mjkrause over 5 yearsOn Ubuntu 16: Upgraded from 2017.1.1, which I installed using the tarball, to 2018.3.2 (both CE) by running
sudo snap install pycharm-community --classic
. It asks whether I want to import settings from the existing installation, which I did. Everything worked, well, like a charm... It created.PyCharmCE2018.3
in home. -
jonathan about 5 years@AdrianW it appears that it depends on the upgrade path. I performed an update (i.e. a patch upgrade) from 2018.3.1 to 2018.3.4 today, and wasn't forced to download a separate install. major upgrades appear to still require the above process with a tar file download.
-
ijuneja almost 4 yearsExtracting from tarball What worked for me was even simpler, run
sudo ./pycharm.sh
after navigating to thebin
folder of the new version. Once the new version opens, navigate toTools -> Create Desktop Entry
. The desktop launcher was now linked to the new version automatically.