Remove Packages
Soar provides straightforward commands for removing installed packages from your system. This guide covers the removal options, what happens during removal, and troubleshooting tips.
Usage
To remove a package, use the remove command or one of its aliases.
Removing a single package
soar remove <package>soar r <package>soar del <package>Example: remove 7z.
soar remove 7zCommand options
The remove command supports the following options.
| Option | Description |
|---|---|
--yes | Skip confirmation prompts. Automatically selects the first option when multiple packages match. |
--all | Remove all installed variants of the specified package across different pkg_ids. |
Using --yes
Skip interactive prompts when removing packages.
# Remove without confirmation
soar remove --yes 7z
# Automatically select first match when multiple variants exist
soar remove --yes batUsing --all
Remove all installed variants of a package.
# Remove all versions of bat from all pkg_ids
soar remove --all bat
# Remove with --yes to skip bulk confirmation
soar remove --all --yes catRemoves every variant
Using --all will remove ALL installed variants of the package, including those from different repositories and pkg_ids. Use with caution.
Removing multiple packages
Remove multiple packages in a single command.
soar remove <package1> <package2> <package3>Example: remove 7z and bat.
soar remove 7z batINFO
If you provide only the package name without a pkg_id and multiple packages match, you will be prompted to select ONE package to remove. Use --all to remove all variants.
Removing a package from a specific pkg_id
soar remove <package>#<pkg_id>Example: remove cat from the git.busybox.net.busybox.standalone.glibc pkg_id.
soar remove cat#git.busybox.net.busybox.standalone.glibcRemoving all packages from a specific pkg_id
soar remove '<name>#all'This searches for all pkg_ids that cat is in and prompts you to choose one.
soar remove 'cat#all'After you select a pkg_id, all packages from that pkg_id will be removed.
What Happens During Removal
When you remove a package, Soar performs these cleanup operations.
- Pre-Remove Hook (if configured)
- Binary Symlink Removal from
~/.local/share/soar/bin - Provides Symlink Cleanup for alternative names
- Desktop Entry Removal from
~/.local/share/applications - Icon Symlink Cleanup from
~/.local/share/icons - Package Directory Removal from
~/.local/share/soar/packages - Cache Handling: download cache preserved (use
soar clean --cacheto reclaim) - Database Cleanup: removes the package record and portable entries
Example output:
Removed 7z#upstream.release:official (24.08)
- Removed binary: ~/.local/share/soar/bin/7z
- Removed directory: ~/.local/share/soar/packages/7z-24.08
- Reclaimed 2.3 MiBPartial vs Complete Removal
Complete removal
A complete removal occurs when:
- The package was successfully installed (
is_installed = true) - All files and symlinks are properly cleaned up
- The package is removed from the database
This is the normal and expected removal process.
Partial removal (broken packages)
A partial or incomplete installation can occur when:
- The installation process was interrupted (network failure, system crash)
- Disk space ran out during installation
- The package was manually deleted from the filesystem
These are marked as broken packages in Soar's database (is_installed = false).
Identifying broken packages
To check for broken or incomplete installations:
soar healthExample output showing broken packages:
Broken Packages (1):
7z#upstream.release:official /home/user/.local/share/soar/packages/7z-24.08Removing broken packages
To remove all broken packages:
soar clean --brokenThis command:
- Lists all broken packages in the database
- Removes their directories (if they still exist)
- Removes any leftover symlinks
- Cleans up database entries
Troubleshooting
Stuck or incomplete removals
Check system health and fix broken symlinks.
soar health
soar clean --broken-symlinksPackage will not remove
Check file permissions, ensure the package is not running, and use verbose mode.
ls -la ~/.local/share/soar/packages/
pgrep -a <package>
soar --verbose remove <package>For more help, see Health Check.
Manual cleanup
For manual cleanup of stuck packages:
Find the package directory.
shsoar info | grep <package>Remove the directory manually.
shrm -rf ~/.local/share/soar/packages/<package-directory>Remove symlinks manually.
shrm -f ~/.local/share/soar/bin/<package>Run a health check.
shsoar healthClean up any remaining broken symlinks.
shsoar clean --broken-symlinks
Destructive commands
The rm -rf and rm -f commands above permanently delete files. Double-check each path before running them, since there is no undo.