list the installed packages
dpkg –list
how to uninstall package in linux ubuntu & debian
sudo apt-get remove package_name
sudo apt-get –purge remove package_name
sudo apt-get remove package_name
purge = deletes all the configuration files
ex: removing php 8 fpm package
we exactly know the package name.
check its running or not
systemctl status php8.0-fpm
root@-s-4vcpu-8gb-blr1-01:~# systemctl status php8.0-fpm
Unit php8.0-fpm.service could not be found.
sudo apt-get remove php8.0-fpm
Package ‘php8.0-fpm’ is not installed
dpkg –list
php8.0
systemctl status php8.0
apt get purge
sudo apt-get purge php8.0
After this operation, 25.1 MB disk space will be freed.
Do you want to continue? [Y/n] y
dpkg –list | grep php8
root@-s-4vcpu-8gb-blr1-01:~# dpkg –list | grep php8
ii libapache2-mod-php8.0 8.0.3-1+ubuntu18.04.1+deb.sury.org+1 amd64 server-side, HTML-embedded scripting language (Apache 2 module)
ii php8.0-bz2 8.0.3-1+ubuntu18.04.1+deb.sury.org+1 amd64 bzip2 module for PHP
wild card removed purge package
sudo apt-get purge php8*
//done
check
root@-s-4vcpu-8gb-blr1-01:~# dpkg –list | grep php8
root@-s-4vcpu-8gb-blr1-01:~#
removing dependencies those no longer used
sudo apt-get autoremove
remove package in linux rpm
rpm -e Package_Name
remove downloaded archive files,
sudo apt-get clean
how to remove package in linux using yum
yum remove package_name
linux remove package and dependencies
sudo apt-get purge –auto-remove package_name
to removed dependencies
apt/source list and remove them.