As far as I know I can uninstall a program from Ubuntu using this command…
$ sudo dpkg -r packagename
But this does not remove the dependencies while the packagename
installed. To remove all files including dependencies we need to apply this command…
$ sudo apt-get --purge autoremove packagename
But my question is removing the package and all its dependencies is really a good practice? Will --purge autoremove
command make my system as it before installing the packagename
package? Or occasionally I might end up with some broken files and my system might crash while trying to remove everything? Actually I am afraid to implement the --purge autoremove
command and want to know expert opinion before practising this!
Best Answer
It should be quite safe. Autoremove removes only packages, which were installed by dependency of a removed package. They should not be needed. You are correct. Your system should be as before you installed 'packagename'.