• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Source Digit

Source Digit

Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • How To
  • Ubuntu
  • Instagram
  • Blogging
  • Android
  • WordPress
  • +More
    • Cloud Computing
    • Gadgets
    • Social Media
    • Technology
  • Write for Us
Home / How To / How To Uninstall Package In Ubuntu Using dpkg

How To Uninstall Package In Ubuntu Using dpkg

By Sourabh / November 17, 2022 Category: How To, Ubuntu

Ubuntu uninstall package and dependencies. Learn how to uninstall apt package in Ubuntu and remove all installed packages Ubuntu terminal.

How To Uninstall Package In Ubuntu Using DPKG

The dpkg is a tool to install, build, remove and manage Debian packages.

Before you uninstall packages, you will have to get a list of installed packages. You can get the list using dpkg –list command.

The command dpkg –list shows the list of installed packages. Form which you can select the names of installed programs to remove/uninstall later.

This command is only used when you are not sure about the name of the program to remove or uninstall.

Another way is to use dpkg-remove command. The dpkg-remove marks package(s) to be removed. It achieves this by running dpkg --set-selections' and piping in the package name(s) followed bydeinstall’.

NOTE: This program does not install, remove, purge any package. It ONLY sets the status of the package. any actual removal or purging is done the next time dselect, apt-get,aptitude, etc are run.

Removing Packages Using dpkg

To remove a package using dpkg run the following command:

sudo dpkg --remove PACKAGE-NAME

NOTE: Type the actual package name (replace PACKAGE-NAME).

You can also use the same command using the -r parameter instead of remove. SO the command becomes:

sudo dpkg -r PACKAGE-NAME

In case you want to remove broken packages or packages which weren’t fully installed, run the following command:

sudo apt-get clean && sudo apt-get autoremove
sudo apt-get -f install
dpkg --configure -a

Note that the command parameter -f / –fix-broken install will fix broken dependencies and correct possible package corruption problems.

Primary Sidebar

Latest Posts

Delete Directory And Contents Recursively Without Prompt On Linux

Check User Login History In Ubuntu Linux Command Line

Use Locate Command To Find File In Linux Terminal By Name

How To Change Terminal Color In Ubuntu Command Line

How To Run Fsck Manually In Linux To Fix Unexpected Inconsistency

How To Fix Broken Packages On Ubuntu From Terminal

Re Execute The Previous Command In Linux Ubuntu Command Line

How Much RAM Is Needed For Ubuntu PC

How To Find Large Files And Directories In Linux Command Line

How To Use Clear Command History In Linux Terminal

© 2026 Source Digit • Linux, Ubuntu Tutorials & News, Technology, Gadgets & Gizmos

  • Home
  • About
  • Privacy Policy
  • Terms & Conditions
  • Contact Us
  • Sitemap