
It would ask for your permission and you can remove this part similarly we have done previously by adding -y at the end of the command. If you want to remove binaries, configuration files, data, and dependencies, use the following command: To remove the package without including its configuration files and dependencies, use the following command: Use the following command to list installed packages using apt: For example, we can list all the installed software such as we have previously done with dpkg. They may work in similar ways with the similar syntax but still, they are different from their core. This command will solve the remaining problems.Īccording to many users apt and apt-get are the same but they are not. This command will fix all the broken dependencies and will correct package corruption problems. This command will remove the old cache of programs that are older than the current version installed and also remove unnecessary files including dependencies that are no longer required. Sudo apt-get clean & sudo apt-get autoremove It will look similar to the following command:Īs Linux user, we often face a situation where our package is not installed properly which cause malfunctioning and we often fail to locate that package as it is not installed properly.īut you can easily overcome all the issues which you might be facing due to broken packages by given commands: You can also use -r instead of –remove as they are both the same. We can easily remove packages using the following command where we have just interchanged apt-get with dpkg:


As we have already discussed one way to uninstall packages using apt-get and you also have another way to uninstall packages using dpkg. Linux has always been about choice and you get multiple ways to perform almost any task you desire. If you are someone who wants to remove only package keeping files safe, you can follow the given command:

There is another where we only use remove which will only delete packages keeping configuration files and data.

You can follow the given command to use only the “–remove” parameter. This will remove binaries and configuration files related to our desired package, in our case it’s TeamViewer. If you want to uninstall packages without using “remove” parameters, you can easily do it by just using the ” –purge” parameter. As you can see, it asks our permission to remove TeamViewer but if you want to automate this process that won’t ask for your password, you can use -y at the end of the command.
