Uninstall#
Description#
Given a package name and either an install_location or the URL of a wrapp file, uninstall that package after checking it has no local modifications that could be lost.
Note
On storage systems that treat folders as first-class citizens (such as local file systems and Nucleus servers), empty folders may remain after uninstalling a package. WRAPP removes the files that were part of the package but does not remove the folders that contained them. These empty folders need to be removed manually if desired.
Warning
Uninstall will fail if there are local modifications to the installed package that would be lost. To proceed, either discard the modifications manually or use the appropriate force options.
Any package that has been installed can be uninstalled again. There are two modes of uninstallation:
Via the directory in which the package has been installed
Via pointing to the dependency file which had been used to record the install operation. This will also remove the dependency information recorded in that file.
For usage examples, see the Tutorial. For CLI options, run wrapp uninstall --help.
Python API Reference#
- async wrapp.uninstall(
- package_name: str,
- install_location: str,
- package: str | None = None,
- tags: bool = False,
- ignore_file: str | None = None,
- ignore_tags: bool = False,
- force: bool = False,
- *,
- context: CommandParameters = CommandParameters(debug=False, verbose=False, dry_run=False, log_file=None, hash_cache_file=None),
- scheduler: SchedulerContext | None = None,
Given a package name and either an install_location or the URL of a wrapp file, uninstall that package after checking it has no local modifications that could be lost
Any package that has been installed can be uninstalled again. There are two modes of uninstallation: Via the directory in which the package has been installed, or via pointing to the dependency file which had been used to record the install operation. Then uninstall will also remove the dependency information recorded in that file.
- Parameters:
package_name – The name of the package to uninstall
install_location – If install_location is specified as the URL of the package to uninstall, the package will be removed from that install location
package – If no install_location is given, specify the URL of a package file with a dependency to the package to uninstall
tags – If set, check before uninstalling if any tags have been set and are different from the install source. Refuse to uninstall in case of modification in tags.
ignore_file – Specify the name of an ignore file containing rules for ignoring items in the installed package
ignore_tags – If specified, don’t compare the package catalog and the installed location’s tags before allowing to uninstall.
force – Specify this to force uninstall - warning, this might potentially lose data!
context – Global configuration parameters
scheduler – Optionally pre-constructed SchedulerContext. When calling many functions in a row make sure to pre-construct the scheduler.
- Raises:
FailedCommand – When prerequisites not matched
StorageOperationError – Raised when network or file operations fail