I need to uninstall another package before current package being installed, I tried put dpkg --remove com.foo.foo.another in preinst file, which doesn't work, it throws error dpkg: error: dpkg status database is locked by another process. How can I achieve that? Appreciate!
How to uninstall another package before installing current one with dpkg?
1.2k Views Asked by Suge At
1
There are 1 best solutions below
Related Questions in APT
- hashcat : Depends: libminizip1t64 but it is not installable E: Unable to correct problems, you have held broken packages
- nrpe returning different results remotely for check_apt
- gitlab-runner update failed with GPG error signatures were invalid
- How can I ask in stack that after updating CIFS samba client stopped working?
- installing python3.11 and libraries (numpy, matplotlib, scipy) on ubuntu 22.04
- How to fix unmet dependencies after running 'sudo apt update'?
- PostgreSQL uninstalling-reinstalling: maintscripts-functions missing
- ansible VRF aware on builtins for Ubuntu linux with VRFs
- Why libnetfilter_queue was not found in the pkg-config search path?
- Re-enable apt on TrueNAS Scale
- docker images on different computers are different
- APT lock contention on multi-stage (parallel) builds with cache
- How to uninstall a package using python-apt and also remove dependencies?
- Why is libc6-dev not a dependency of most debian development packages?
- Gitlab registry pipeline error on python:3.7 image : The following signatures couldn't be verified because the public key is not available
Related Questions in DEB
- DEB how do I save the configuration files of packages that are deleted during the installation of my package?
- How to uninstall a package using python-apt and also remove dependencies?
- Read information from inside DEB package in preinst
- MPR makedeb/mist is not working for the python3-krfzf-py-git 0.0.4.r1.e403493-2 package: unrecognized argument: --prefix=/usr
- Sonatype Nexus Private Repository unable to prompt for username and password in runtime while pulling the package using cli
- Create .debs using Makefile in linux
- How can I sign a Debian package created from rust project?
- Building a .deb-file for Raspberry Pi
- App icon from deb package not showing on Gnome
- SSL verification problem when uploading a deb package using dput
- How to add custom metadata using fpm for rpm/deb pacakges
- cpack -B build/ fails in parent directory
- Create changelogs for reprepro debian repository
- Make deb-package which updates another deb-package
- MD5 Error while installing package libc6:i386 on Crostini
Related Questions in DPKG
- Obtaining the user's home directory for a daemon application running as root in linux
- DEB how do I save the configuration files of packages that are deleted during the installation of my package?
- Why is libc6-dev not a dependency of most debian development packages?
- Dependency problems while updating kernel 6.1.0-18
- Why isn't sudo apt upgrade working on Ubuntu?
- Building a .deb-file for Raspberry Pi
- pmbus.h missing from /usr/include
- dpkg-shlibdeps: error: no dependency information found
- How to fix broken openmpi after Ubuntu upgrade to version 22.04
- Facing error while installation of any software E: Sub-process /usr/bin/dpkg returned an error code (1) on ubuntu 20.04
- Why is Ubuntu 22.04 specifically having an issue with 'trying to overwrite' a file while upgrading my package?
- Broken apt package: apt --fix-broken install fails, can't create symbolic link in /usr/lib
- Having trouble creating a debian debug package
- I want to install JDK for Debian using ARM64 but I got todpkg: error: archive 'jdk-20.0.2' is not a regular file, how do I fix?
- TensorRT installation in ubuntu shows Invalid Debian format
Related Questions in CYDIA
- DragonMake iOS-simulator error when trying to build
- frida.TimedOutError: unexpectedly timed out while initializing suspended process
- Error installing idb iOS pen testing tool on Mac
- Jailbreak detection mechanism not detecting jailbreak device
- Sideloading ipa using ideviceinstaller
- error: reference to type 'const ItemInstance' could not bind to an rvalue of type 'void'
- I want to define a function with const at the end
- Fake sign with Idid and uploading to cydia repo
- Make a theos tweak work with all user apps
- UIAlertController crashes app when presented from NSURLSessionDataTask?
- How can I hook c# fields with Theos
- Creating static archives with ar or libtool fails on jailbroken iOS
- How can I hook a subview of a subview?
- How can i enable smart invert in iOS? (Objective C and cydia jailbreak app)
- How hook the multitask on iOS 12
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You can't do that. Dpkg locks its database for the whole process of installation - none of your scripts will be able to do anything like installing or uninstalling a package.
I had a similar problem. I wanted to install debian package manually during installation of my app. My app had a daemon which I launched as part of installation. To solve my problem in the daemon I waited until dpkg releases the lock and then installed the package. It's very important that I did it in a daemon as it's detached from
postinstscript, so dpkg can happily finish the installation.You probably need to do something similar.