• 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

Ubuntu 25.04 ‘Plucky Puffin’ Is Available To Download

How to Login as Root User in Linux Terminal

Install Firefox In Ubuntu Terminal Command Line

How To Check Kernel Installed Date In Linux Ubuntu

How To List All Kernel Modules That Are Loaded In Ubuntu

Enable Ubuntu Auto Login Without Password

Download Ubuntu 25.04 Official Default Wallpapers

How To Fix Initramfs Error In Ubuntu Command Line

How To Check All Available Kernel Version In Linux Ubuntu

3 Best Artificial Intelligence Domain Name Generators

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

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