Uninstall Bareun
This page explains how to remove Bareun from your computer, by installation method.
There are four installation methods: the Linux package (.deb), the macOS installer (.pkg), the Windows installer (.msi), and the case where you extracted an archive (tar.gz or zip) yourself.
The order is the same for every method.
- (Optional) Unregister the API key you registered on this computer.
- Stop the service.
- Remove the program.
- Delete the remaining data folder.
- Verify the removal is complete.
Locations by installation method at a glance
| Installation method | Install location | Service name | Data folder left after removal |
|---|---|---|---|
| Linux (.deb) | /opt/bareun | systemd service bareun | /opt/bareun/var |
| macOS (.pkg) | /Applications/bareun.app | LaunchDaemon ai.baikal.bareun | /Library/Application Support/bareun/var |
| Windows (.msi) | C:\Program Files\bareun (the folder you chose at install time) | Windows service bareunsvc (display name 바른 한국어 형태소분석기, "Bareun Korean Morphological Analyzer") | C:\Program Files\bareun\var |
| Archive (tar.gz, zip) | The folder you extracted to | None (run directly) | The whole extracted folder |
The data folder remains even after you remove the package
Files that Bareun creates while running accumulate in the var folder. Package managers and installers remove only the files they installed, so this folder stays even after removal.
models/: models and dictionaries downloaded the first time the server rancustom-dict/: custom dictionarieslogs/: log fileslicense.pem: the license fileapi-keys.db.pb: API key information registered on this computer
To remove Bareun completely, delete this folder too, following the instructions for your installation method below.
What to back up before deleting
If you plan to install again, keep the following before you delete.
- Custom dictionary: We recommend keeping the original word lists and, after a fresh installation, registering them again with the
UpdateCustomDictionaryAPI. (See Version-control your custom dictionary with Git.) If you want to reinstall on the same computer and use it as is, copy thevar/custom-dictfolder. - License file: Copy
var/license.pem. - API key: Write down the key value separately and, after reinstalling, register it with the
bareun -regcommand or the administrator web page. - You do not need to back up models. The first time the server runs, it downloads the model that matches its version automatically.
Config file placed in your home folder
If you created a config file (bareun.json) separately in the .bareun folder in your home folder, this folder remains whichever way you remove Bareun. Delete it yourself if you do not need it.
How to uninstall by installation method
The .deb package installs to /opt/bareun and runs as the systemd service bareun.
The package name is bareun (the GPU package has the same name).
1. Unregister the API key (optional)
While the service is running, you can unregister this computer's API key with the following command.
sudo /opt/bareun/bin/bareun -unreg YOUR-API-KEY
2. Stop the service
Stop the service and disable it so it does not start automatically at boot.
sudo systemctl disable --now bareun
3. Remove the package
sudo apt remove bareun
sudo systemctl daemon-reload
apt remove deletes the program files installed at install time (under /opt/bareun) and the service file (/etc/systemd/system/bareun.service).
Difference between apt remove and apt purge
apt purge bareun also deletes the package's config files on top of apt remove.
But the Bareun package has no separately managed config files, so the two commands give the same result.
Neither command deletes the /opt/bareun/var folder created while the server ran.
During removal you may see a message such as directory '/opt/bareun/var' not empty so not removed. It only tells you that this folder remains, so it is not an error.
4. Delete the remaining data
To keep your custom dictionary and license, first copy the /opt/bareun/var/custom-dict folder and /opt/bareun/var/license.pem somewhere else.
Then delete the remaining folder.
sudo rm -rf /opt/bareun
5. Verify the removal
systemctl status bareun # If "Unit bareun.service could not be found." appears, the service is gone.
dpkg -l | grep bareun # If nothing appears, or the first column is not ii, the package is removed.
ss -ltn | grep 5656 # If nothing appears, no program is using port 5656.
ls /opt/bareun # If "No such file or directory" appears, the folder is gone too.
The .pkg installer installs the program in /Applications/bareun.app, registers it as the LaunchDaemon ai.baikal.bareun, and runs it at every boot.
Data accumulates in /Library/Application Support/bareun/var.
macOS has no uninstaller for installers, so delete everything by hand in the order below.
1. Unregister the API key (optional)
While the service is running, you can unregister this computer's API key with the following command.
sudo /Applications/bareun.app/Contents/MacOS/bareun -unreg YOUR-API-KEY
2. Stop the service
sudo launchctl bootout system/ai.baikal.bareun
Stopping with sudo bareunctl stop works the same. If the service is already stopped, an error message appears, and you can simply go on to the next step.
3. Delete the program and service files
sudo rm -f /Library/LaunchDaemons/ai.baikal.bareun.plist
sudo rm -f /usr/local/bin/bareunctl
sudo rm -rf /Applications/bareun.app
/Library/LaunchDaemons/ai.baikal.bareun.plist: the service registration file that runsBareunat boot/usr/local/bin/bareunctl: a shortcut (symbolic link) to the service control commandbareunctl/Applications/bareun.app: the program itself
4. Delete the installation record
macOS keeps a separate record of what you installed with a .pkg. After deleting the program files, delete this record too.
sudo pkgutil --forget ai.baikal.bareun
5. Delete the remaining data
To keep your custom dictionary and license, first copy the
/Library/Application Support/bareun/var/custom-dict folder and
/Library/Application Support/bareun/var/license.pem somewhere else.
Then delete the remaining folder.
sudo rm -rf "/Library/Application Support/bareun"
Macs where an older version was installed
Older versions of Bareun used a different service registration file name. If the following files remain, delete them too.
sudo launchctl bootout system /Library/LaunchDaemons/bareun.plist
sudo rm -f /Library/LaunchDaemons/bareun.plist /Library/LaunchAgents/bareun.plist
6. Verify the removal
pkgutil --pkgs | grep bareun # If nothing appears, the installation record is gone.
sudo launchctl print system/ai.baikal.bareun # If it says the service cannot be found, the service is gone.
lsof -nP -iTCP:5656 -sTCP:LISTEN # If nothing appears, no program is using port 5656.
ls /Applications/bareun.app # If "No such file or directory" appears, the program is gone.
The .msi installer installs Bareun in C:\Program Files\bareun (or the folder you chose instead at install time)
and registers it as the Windows service bareunsvc (display name 바른 한국어 형태소분석기, "Bareun Korean Morphological Analyzer").
Run all the commands below in a Command Prompt with administrator rights
(right-click the Command Prompt icon and choose "Run as administrator").
1. Unregister the API key (optional)
While the service is running, you can unregister this computer's API key with the following command.
"C:\Program Files\bareun\bin\bareun.exe" -unreg YOUR-API-KEY
2. Stop the service
sc stop bareunsvc
You can also select 바른 한국어 형태소분석기 in services.msc and stop it.
If you remove it while the service is running, it asks for a restart after removal, so it is better to stop it first.
3. Remove the program
Choose one of the following methods.
-
In the Start menu
바른("Bareun") folder, click바른 제거("Uninstall Bareun"). -
Remove it from Windows Settings. On Windows 11, go to Settings > Apps > Installed apps; on Windows 10, go to Settings > Apps > Apps & features, find
바른, and clickUninstall. -
Remove it with a command. If you still have the
.msifile used for installation, you can remove it with that file.msiexec /x bareun-installer.msiIf you do not have the installation file, remove it from PowerShell (administrator) with the following command.
Get-CimInstance Win32_Product -Filter "Name = '바른'" | ForEach-Object { Start-Process msiexec.exe -ArgumentList "/x $($_.IdentifyingNumber)" -Wait }
Removal also cleans up the following.
- The Windows service
bareunsvc(unregistered after it is stopped) - The system environment variable
BAREUN_ROOT - The
바른("Bareun") folder in the Start menu and the바른shortcut on the desktop - The program files installed at install time
4. Delete the remaining data
The C:\Program Files\bareun\var folder remains even after removal.
To keep your custom dictionary and license, first copy the var\custom-dict folder and var\license.pem somewhere else. Then delete the remaining folder.
rmdir /s /q "C:\Program Files\bareun"
5. Verify the removal
Open a new Command Prompt window and run the following.
sc query bareunsvc
echo %BAREUN_ROOT%
netstat -ano | findstr :5656
- If
sc query bareunsvcgives error 1060 (the specified service does not exist as an installed service), the service is gone. - If
echo %BAREUN_ROOT%prints%BAREUN_ROOT%as it is, the environment variable is gone. Environment variables are reflected only in newly opened windows, so the value may still appear in a window you opened before removing. - If the
netstatresult is empty, no program is using port 5656.
If you installed from an archive, Bareun exists only inside the folder you extracted to.
Models, custom dictionaries, logs, the license, and API key information are all under var in that folder,
so you only need to stop it, delete the folder, and then delete the environment variables you registered at install time.
The paths in the examples below follow the examples in the installation document, so replace them with the path where you actually extracted.
1. Unregister the API key (optional)
While the server is running, you can unregister this computer's API key with the following command.
# Linux and macOS
$BAREUN_ROOT/bin/bareun -unreg YOUR-API-KEY
rem Windows
c:\Users\me\bareun-v3.4.0\bin\bareun.exe -unreg YOUR-API-KEY
2. Stop it
If you ran it with nohup on Linux or macOS, stop it with the following command.
pkill -f "$BAREUN_ROOT/bin/bareun"
On Windows, close the command window where you ran Bareun, or stop it with the following command.
taskkill /IM bareun.exe /F
If you registered a service yourself on Windows with bareun.exe -svc=install,
stop the service and unregister it from a Command Prompt with administrator rights.
c:\Users\me\bareun-v3.4.0\bin\bareun.exe -svc=stop
c:\Users\me\bareun-v3.4.0\bin\bareun.exe -svc=remove
If you registered it yourself as a service in systemd or launchd on Linux or macOS, stop that service too and delete its registration file.
3. Delete the folder
To keep your custom dictionary and license, first copy the var/custom-dict folder and
var/license.pem in the install folder somewhere else. Then delete the whole install folder.
# Linux and macOS (example path from the installation document)
rm -rf ~/bareun-v3.4.0
rem Windows (example path from the installation document)
rmdir /s /q c:\Users\me\bareun-v3.4.0
4. Delete the environment variables
-
Linux and macOS: Delete the
BAREUN_ROOT,PATH, andLD_LIBRARY_PATHsetting lines you added to~/.bashrc(~/.zshrcif you use zsh) at install time, and open a new terminal. -
Windows: Delete the
BAREUN_ROOTregistered withsetx.reg delete HKCU\Environment /v BAREUN_ROOT /fIf you added
Bareun'sbinfolder toPATH, open the user variablePathunder System Properties > Advanced > Environment Variables and delete that entry.
5. Verify the removal
# Linux and macOS: run in a new terminal.
echo $BAREUN_ROOT # If an empty line appears, the environment variable is gone.
ss -ltn | grep 5656 # Linux. If nothing appears, no program is using port 5656.
lsof -nP -iTCP:5656 -sTCP:LISTEN # macOS. If nothing appears, no program is using port 5656.
rem Windows: run in a new Command Prompt window.
echo %BAREUN_ROOT%
netstat -ano | findstr :5656
On Windows, if echo %BAREUN_ROOT% prints %BAREUN_ROOT% as it is and the netstat result is empty, the removal is complete.
If you installed with Docker
If you installed with Docker, stop and delete the container and then delete the image.
The data remains in the folder you mounted when you ran the container (the installation document's example is ~/bareun/var), so delete this folder too to remove everything.
docker rm -f bareun
docker rmi bareunai/bareun:latest
rm -rf ~/bareun/var
Frequently asked questions
Q. Should I use apt remove or apt purge?
Either gives the same result, because the Bareun package has no separately managed config files.
Both commands leave the /opt/bareun/var folder (models, custom dictionaries, logs, license, API key information), so to remove everything, run sudo rm -rf /opt/bareun afterward.
Q. After removing and reinstalling, API key registration fails with an "Other key is registered" error.
This is because the API key information you registered earlier (api-keys.db.pb) remains in the var folder you left behind.
Run bareun -unreg PREVIOUS-API-KEY with the previous key to unregister it, and then register again.
If you do not know the previous key, stop the service, delete the api-keys.db.pb file in the var folder, and then register.
Q. Does it download the models again when I reinstall?
If you deleted the var/models folder, the models are downloaded again the first time the server runs.
If you kept the folder, it uses the models as they are when a model matching the new version is already there, and downloads only when there is not.
Q. On Windows it tells me to restart after removal.
This is because you removed it while the Bareun service was running. Restarting finishes the removal.
To remove it without restarting, stop the service with sc stop bareunsvc in a Command Prompt with administrator rights before removing.
Q. What should I back up to keep my custom dictionary?
We recommend keeping the original word lists and registering them again with the UpdateCustomDictionary API after a fresh installation.
If you want to reinstall on the same computer and use it as is, copy the var/custom-dict folder before removing.
It is also good to copy the license file (var/license.pem) along with it.