关闭正在运行的PhpStorm,避免卸载过程中出现文件占用问题;备份重要数据(如项目文件、自定义配置等),防止误删导致数据丢失。
若你使用snap install phpstorm命令安装,可通过以下步骤快速卸载:
sudo snap remove phpstorm,输入密码后确认卸载;若你使用apt install phpstorm或apt-get install phpstorm命令安装,可按以下步骤操作:
sudo apt remove phpstorm(保留配置文件)或sudo apt purge phpstorm(同时删除配置文件);sudo apt autoremove,移除不再需要的依赖包;~/.PhpStorm*、~/.WebIde*),执行rm -rf ~/.PhpStorm* ~/.WebIde*。若你通过下载官方tar.gz文件解压安装(默认路径为/opt/phpstorm或~/phpstorm),需手动删除安装目录及配置文件:
/opt目录(需管理员权限),执行sudo rm -rf /opt/phpstorm;若安装在用户主目录,执行rm -rf ~/phpstorm;rm -rf ~/.PhpStorm* ~/.WebIde*,清除用户配置、缓存及插件数据;rm ~/.local/share/applications/phpstorm*.desktop,移除启动器图标。若你通过图形界面(Ubuntu软件中心)搜索并安装PhpStorm,可直接通过以下步骤卸载:
phpstorm命令,若提示“command not found”,说明主程序已删除;/opt、~/.local/share/applications/等目录,确认无PhpStorm相关文件;.config、.cache),确保无PhpStorm残留配置。whereis phpstorm定位安装路径);