I'm trying to check if a package is installed or not.
Here is a link for finding all packages with "deinstall
" status:
dpkg --get-selections shows packages marked "deinstall"
But I can't find any packages with "deinstall
" from my running Ubuntu
system.
What command can be used to make a "installed
" package become the "deinstall
" for testing purpose?
Note all those
|
and/
characters in the left edge... they are meant to point out the first two (three?) characters in the list of packages that follow these four lines (when you removehead -n 4
and actually list the packages).If the two first characters are
ii
- then the package listed on that line is actually installedAll other possible combinations are listed in those first four lines.
So
dpkg -l | grep -E '^ii'
lists all actually installed packages.dpkg -l | grep -E '^.H'
should list software in Half-inst state.I'm not sure what "deinstall" would correspond to.
Then
sudo apt install package-name
- to install a packagesudo apt remove package-name
- to remove (uninstall) a packagesudo apt purge package-name
- to remove a package and it's config/settings files.