uninstall a deb package code example

Example 1: ubuntu remove package and dependencies install deb

#For Ubuntu the correct method to remove packages through the console is:
apt-get –-purge remove skypeforlinux.
dpkg –-remove skypeforlinux.
dpkg –r packagename.deb.
apt-get clean && apt-get autoremove. sudo apt-get -f install. ...
#apt-get update. #dpkg –-configure -a. ...
apt-get -u dist-upgrade.
apt-get remove –dry-run packagename.

Example 2: install ubuntu deb

#install downloaded .deb
sudo dpkg -i /path/name.deb

#install packages
sudo apt install package_name