how to remove a deb package in ubuntu 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

Example 3: install *.deb file in ubuntu

Install a downloaded program in Ubuntu - Linux
sudo dpkg -i package_file.deb
//or
sudo apt install path_to_deb_file

Tags:

C Example