Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remove/Backup – settings & cli for macOS (OS X) – DataGrip, AppCode, CLion, Gogland, IntelliJ, PhpStorm, PyCharm, Rider, RubyMine, WebStorm
#!/usr/bin/env bash
set -u
FILE=~/Desktop/JetBrains-$(date "+%Y%m%d-%H%M%S").tar.xz
if [ "`uname -s`" != "Darwin" ] ; then
echo "Sorry, $(uname -s) is not supported yet."
exit 1
fi
# Clear Application Saved States JetBrains
tar pf "$FILE" --append ~/Library/Saved\ Application\ State/com.jetbrains.* &>/dev/null
tar pf "$FILE" --append ~/Library/Preferences/jetbrains.* &>/dev/null
tar pf "$FILE" --append ~/Library/Application\ Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.jetbrains.* &>/dev/null
tar pf "$FILE" --append ~/Library/Application\ Support/CrashReporter/* &>/dev/null
# DataGrip (0xDBE10)
tar pf "$FILE" --append ~/Library/{Preferences,Caches,Application\ Support,Logs}/{DataGrip,0xDBE}{??,???,20??.*,-EAP} &>/dev/null
# AppCode
tar pf "$FILE" --append ~/Library/Preferences,Caches,Application\ Support,Logs/appCode{??,???,20??.*,-EAP} &>/dev/null
# CLion
tar pf "$FILE" --append ~/Library/{Preferences,Caches,Application\ Support,Logs}/clion{??,???,20??.*,-EAP} &>/dev/null
# Gogland
tar pf "$FILE" --append ~/Library/{Preferences,Caches,Application\ Support,Logs}/Gogland{?.?} &>/dev/null
# IntelliJ IDEA
tar pf "$FILE" --append ~/Library/{Preferences,Caches,Application\ Support,Logs}/IntelliJIdea{??,???,20??.*,-EAP} &>/dev/null
# IntelliJ IDEA Community Edition
tar pf "$FILE" --append ~/Library/{Preferences,Caches,Application\ Support,Logs}/IdeaIC{??,???,20??.*,-EAP} &>/dev/null
# PhpStorm
tar pf "$FILE" --append ~/Library/{Preferences,Caches,Application\ Support,Logs}/{PhpStorm,WebIde}{??,???,20??.*,-EAP} &>/dev/null
# PyCharm
tar pf "$FILE" --append ~/Library/{Preferences,Caches,Application\ Support,Logs}/PyCharm{??,???,20??.*,-EAP} &>/dev/null
# PyCharm Educational Edition
tar pf "$FILE" --append ~/Library/{Preferences,Caches,Application\ Support,Logs}/PyCharmEdu{??,???,20??.*,-EAP} &>/dev/null
# Rider
tar pf "$FILE" --append ~/Library/{Preferences,Caches,Application\ Support,Logs}/Rider{??,???,20??.*,-EAP} &>/dev/null
# RubyMine
tar pf "$FILE" --append ~/Library/{Preferences,Caches,Application\ Support,Logs}/RubyMine{??,???,20??.*,-EAP} &>/dev/null
# WebStorm
tar pf "$FILE" --append ~/Library/{Preferences,Caches,Application\ Support,Logs}/WebStorm{?,??,20??.*,-EAP} &>/dev/null
echo 'Check backup all data before deleting the product'
echo "The configuration backup is successfully created: $FILE (size: $(du -sh $FILE|cut -f1))"
# open -R $FILE
#!/usr/bin/env bash
set -x
if [ "`uname -s`" != "Darwin" ] ; then
echo "Sorry, $(uname -s) is not supported yet."
exit 1
fi
# Clear Application Saved States JetBrains
rm -rfv ~/Library/Saved\ Application\ State/com.jetbrains.*
rm -fv ~/Library/Preferences/jetbrains.*
rm -fv ~/Library/Application\ Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.jetbrains.*
# rm -fv ~/Library/Application\ Support/CrashReporter/*
# DataGrip (0xDBE10)
rm -rfv ~/Library/Preferences/{DataGrip,0xDBE}{??,???,20??.*,-EAP}
rm -rfv ~/Library/Caches/{DataGrip,0xDBE}{??,???,20??.*,-EAP}
rm -rfv ~/Library/Application\ Support/{DataGrip,0xDBE}{??,???,20??.*,-EAP}
rm -rfv ~/Library/Logs/{DataGrip,0xDBE}{??,???,20??.*,-EAP}
# AppCode
rm -rfv ~/Library/Preferences/appCode{??,???,20??.*,-EAP}
rm -rfv ~/Library/Caches/appCode{??,???,20??.*,-EAP}
rm -rfv ~/Library/Application\ Support/appCode{??,???,20??.*,-EAP}
rm -rfv ~/Library/Logs/appCode{??,???,20??.*,-EAP}
# CLion
rm -rfv ~/Library/Preferences/clion{??,???,20??.*,-EAP}
rm -rfv ~/Library/Caches/clion{??,???,20??.*,-EAP}
rm -rfv ~/Library/Application\ Support/clion{??,???,20??.*,-EAP}
rm -rfv ~/Library/Logs/clion{??,???,20??.*,-EAP}
# Gogland
rm -rfv ~/Library/Preferences/Gogland{?.?}
rm -rfv ~/Library/Caches/Gogland{?.?}
rm -rfv ~/Library/Application\ Support/Gogland{?.?}
rm -rfv ~/Library/Logs/Gogland{?.?}
# IntelliJ IDEA
rm -rfv ~/Library/Preferences/IntelliJIdea{??,???,20??.*,-EAP}
rm -rfv ~/Library/Caches/IntelliJIdea{??,???,20??.*,-EAP}
rm -rfv ~/Library/Application\ Support/IntelliJIdea{??,???,20??.*,-EAP}
rm -rfv ~/Library/Logs/IntelliJIdea{??,???,20??.*,-EAP}
# IntelliJ IDEA Community Edition
rm -fv /usr/local/bin/idea
rm -rfv ~/Library/Preferences/IdeaIC{??,???,20??.*,-EAP}
rm -rfv ~/Library/Caches/IdeaIC{??,???,20??.*,-EAP}
rm -rfv ~/Library/Application\ Support/IdeaIC{??,???,20??.*,-EAP}
rm -rfv ~/Library/Logs/IdeaIC{??,???,20??.*,-EAP}
# PhpStorm
rm -fv /usr/local/bin/pstorm
rm -rfv ~/Library/Preferences/{PhpStorm,WebIde}{??,???,20??.*,-EAP}
rm -rfv ~/Library/Caches/{PhpStorm,WebIde}{??,???,20??.*,-EAP}
rm -rfv ~/Library/Application\ Support/{PhpStorm,WebIde}{??,???,20??.*,-EAP}
rm -rfv ~/Library/Logs/{PhpStorm,WebIde}{??,???,20??.*,-EAP}
# PyCharm
rm -fv /usr/local/bin/charm
rm -rfv ~/Library/Preferences/PyCharm{??,???,20??.*,-EAP}
rm -rfv ~/Library/Caches/PyCharm{??,???,20??.*,-EAP}
rm -rfv ~/Library/Application\ Support/PyCharm{??,???,20??.*,-EAP}
rm -rfv ~/Library/Logs/PyCharm{??,???,20??.*,-EAP}
# PyCharm Educational Edition
rm -rfv ~/Library/Preferences/PyCharmEdu{??,???,20??.*,-EAP}
rm -rfv ~/Library/Caches/PyCharmEdu{??,???,20??.*,-EAP}
rm -rfv ~/Library/Application\ Support/PyCharmEdu{??,???,20??.*,-EAP}
rm -rfv ~/Library/Logs/PyCharmEdu{??,???,20??.*,-EAP}
# Rider
rm -fv /usr/local/bin/rider
rm -rfv ~/Library/Preferences/Rider{??,???,20??.*,-EAP}
rm -rfv ~/Library/Caches/Rider{??,???,20??.*,-EAP}
rm -rfv ~/Library/Application\ Support/Rider{??,???,20??.*,-EAP}
rm -rfv ~/Library/Logs/Rider{??,???,20??.*,-EAP}
# RubyMine
rm -fv /usr/local/bin/mine
rm -rfv ~/Library/Preferences/RubyMine{??,???,20??.*,-EAP}
rm -rfv ~/Library/Caches/RubyMine{??,???,20??.*,-EAP}
rm -rfv ~/Library/Application\ Support/RubyMine{??,???,20??.*,-EAP}
rm -rfv ~/Library/Logs/RubyMine{??,???,20??.*,-EAP}
# WebStorm
rm -fv /usr/local/bin/wstorm
rm -rfv ~/Library/Preferences/WebStorm{?,??,20??.*,-EAP}
rm -rfv ~/Library/Caches/WebStorm{?,??,20??.*,-EAP}
rm -rfv ~/Library/Application\ Support/WebStorm{?,??,20??.*,-EAP}
rm -rfv ~/Library/Logs/WebStorm{?,??,20??.*,-EAP}
@Shchvova

This comment has been minimized.

Copy link

@Shchvova Shchvova commented Jan 20, 2015

rm -rfv ~/Library/Preferences/clion10
also, sudo is excessive. No need to use it, it is unsafe

@remram44

This comment has been minimized.

@denji

This comment has been minimized.

Copy link
Owner Author

@denji denji commented Apr 11, 2015

Themes JetBrains

Themes Other

Docs/PDF

Structure `~/Library/Preferences/{Product}/*/`

Folder name User Settings
codestyles Containscode style schemes.
colors Containseditor colors and fontscustomization schemes.
filetypes Contains user-definedfile types.
inspection Containscode inspection profiles.
keymaps Contains keyboard shortcuts customizations.
options Contains various options, for example, feature usage statistics and macros.
templates Contains user-definedlive templates.
tools Contains configuration files for theuser-defined external tools.
shelf Containsshelved changes.

Useful Custom Plugins

  • CodeGlance - code minimap similar to Sublime.
  • Dummy Text Generator - Random text generator with different genres.
  • FavoriteFolders - Adds favorite folders into FileChooser dialog toolbar.
  • Frame Switcher - Switching between projects/frames/windows.
  • Handlebars/Mustache
  • Injector - Fast Ruby code injection into erb files.
  • Keymap exporter - export keymaps to PDF.
  • Markdown
  • Scratch - quickly opens temporary text editor tab.


.deb package builder

@yuriidanyliak

This comment has been minimized.

Copy link

@yuriidanyliak yuriidanyliak commented Dec 1, 2015

also, for RubyMine under Ubuntu:

rm -rf ~/.RubyMine?0/
rm -rf ~/.gnome/apps/jetbrains-rubymine.desktop
rm -rf ~/.local/share/applications/jetbrains-rubymine.desktop
@alexanza

This comment has been minimized.

Copy link

@alexanza alexanza commented May 26, 2016

Maybe SIP ?

@denji

This comment has been minimized.

Copy link
Owner Author

@denji denji commented May 26, 2016

@SvezDay csrutil status

@Zegnat

This comment has been minimized.

Copy link

@Zegnat Zegnat commented Aug 14, 2016

Any reason why rm -fv ~/Library/Preferences/jetbrains.* is commented?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment