How to Uninstall Bitbucket Server
Platform Notice: Data Center Only - This article only applies to Atlassian apps on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Instructions on how to uninstall Bitbucket Server.
Solution
The below information refers to two variables: BITBUCKET_INSTALLATION and BITBUCKET_HOME.
BITBUCKET_INSTALLATION: The default installation path on Windows is C:\Atlassian\Bitbucket. On Linux it is \opt\atlassian.
BITBUCKET_HOME: The default home path on Windows is C:\Atlassian\ApplicationData. On Linux it is \var\atlassian.
⚠️ The user can change these locations when installing; therefore, we use variables below as opposed to exclusive paths.
Windows
If the application was installed as a service, stop the service via the Windows GUI. If the application was not installed as a service, use the stop-bitbucket.bat executable in the
C:\%BITBUCKET_INSTALLATION%\bindirectory.If application was installed as a service, uninstall the Bitbucket Server service.
(You'll need to know the service name for Bitbucket. If you are unsure of it, you can check it at the Task Manager, in the Services tab.)
On the command prompt, navigate to
C:\%BITBUCKET_INSTALLATION>\binRemove the current Bitbucket and elasticsearch service by running:
service.bat remove <Bitbucket service name>
service.bat remove <ES service name>
Remove
%BITBUCKET_HOME%and%BITBUCKET_INSTALLATION%directories.If present, remove
%BITBUCKET_HOME%environment variable from within the Windows GUI by going toControl Panel > System > Advanced Settings > Environment variablesIf one has been added, remove the
atlbitbucketuser.Remove any shortcuts or icons from Desktop or Start Menu.
If Bitbucket Server was configured to use an external database, the corresponding database tables can be dropped or the database itself deleted.
Delete Registry entry (Optional): Example for a 64bit system - From
Start MenuclickRun. In the open field enter%systemroot%\syswow64\regedit. Click/SelectHKEY_LOCAL_MACHINE. In Registry Editor menu clickEdit > Find. In the"Find what"field typebitbucket. In the panel on the right select theBitbucketentry. ChooseEditonce more from the Registry Editor menu and selectdelete.
Linux
If the application was installed as a service, stop the service by running
service atlbitbucket stopfrom the host machine's command line. If the application was not installed as a service, use the stop-bitbucket.sh shell script in the$BITBUCKET_INSTALLATION/bindirectory.If application was installed as a service, uninstall the Bitbucket Server service.
(You'll need to know the service name for Bitbucket. If you are unsure of it, you can check it by running
service --status-allfrom the host machine's command line)On the command prompt, navigate to
$BITBUCKET_INSTALLATION/binRemove the current service by running:
install_linux_service.sh -u remove_service <service name>
Remove
$BITBUCKET_HOMEand$BITBUCKET_INSTALLATIONdirectories.If present, remove
$BITBUCKET_HOMEenvironment variable from.bash_profileor/etc/profileIf one has been added, remove the
atlbitbucketuser.If Bitbucket Server was configured to use an external database, the corresponding database tables can be dropped or the database itself deleted.
Mac
In MacOS Bitbucket is intalled via ZIP or TAR method.
To remove the application is enough to remove Bitbucket home and installation folders.
If present, remove
$BITBUCKET_HOMEenvironment variable from.bash_profileor/etc/profile.If one has been added, remove the
atlbitbucketuser.
Was this helpful?