Today, I will show you how you can uninstall any files in Linux with simple commands.

Linux uninstall program


We have to use dpkg command to see a list of all installed packages on the computer.
root@error502:~# dpkg --list
Now scroll down a choose the app you want to uninstall or simply copy and paste its name
To uninstall a program first type "apt-get" which is also used in to installing software
"purge" it is used to  delete all the configuration files
root@error502:~# apt-get purge remove application_name

-------------------------------

If you don't want to remove the configuration files, just leave the "--purge" command
and type
root@error502:~#apt-get remove application_name

-------------------------------

when uninstalling a program, sometimes there are some packages left from an uninstalled program
which are no longer used, so to remove this types of packages, we use "autoremove" command
root@error502:~#apt-get autoremove

-------------------------------

We can combine both
root@error502:~#apt-get remove application_name
and
root@error502:~#apt-get autoremove

and remove a program and its dependencies that will no longer be used
for this type
root@error502:~#apt-get --auto-remove application_name
--------------------------------

Sometimes the uninstalled program after uninstalling still store its directories such as caches, cookies
and takes lots of space
So to clean all this spaces we use
root@error502:~#apt-get clean

This command removes the aptitude cache in “/var/cache/apt/archives”.
When you install a program, the package file is downloaded and stored in that directory

--------------------------------