Uninstall A Package Via Command Line On Ubuntu Linux

Use one of these codes here to get a list of all the packages on your device.

$ apt --installed
$ dpkg -l

Once you have found that program, use apt or one of these commands to remove it.

$ sudo apt remove package-name
$ sudo apt-get remove package-name
$ sudo dpkg -r package-name

Any of the above commands will remove the specified package, but they will leave behind configuration files, and in some cases, other files that were associated with the package. To remove those as well, you need to “purge” the package. You can do this either after removing a package or instead of removing a package (purging automatically implies removing as well).

$ sudo apt purge package-name
$ sudo apt-get purge package-name
$ sudo dpkg -P package-name