Remove Package on Ubuntu From Command Line

In this article we will show you how to Remove Package on Ubuntu From Command Line. Ubuntu Desktop is a Linux distribution developed by Canonical, and itโ€™s one of the most popular distros, thanks to its ease of use. Itโ€™s also one of the top choices for people who are getting started with Linux. The server edition, which we wonโ€™t be focusing on here, is also operating in the majority of internet servers.

So what is a Linux distribution? Itโ€™s an operating system developed from the Linux kernel, UNIX-like system created by Linus Torvalds in 1991. It is one of the best operating system for hackers and for professional users like developers and coders, Linux distributions are usually free and open source, and many are great alternatives to popular operating systems like Windows and Apple Laptops macOS.

If thereโ€™s software on your Ubuntu Linux system that you wish to remove, there are a few ways to go about uninstalling the associated packages. Since Ubuntu can install packages through apt or through Snap. Below we mentioned the steps to Remove Package on Ubuntu From Command Line.

How to Use Command Line to Remove Package on Ubuntu

Dpkg (Debian Package) is a standard package manager in many versions of Linux. To uninstall a package with the dpkg command, you need to know the exact name of the package you intend to uninstall.

To list installed packages in Ubuntu, enter the following into a terminal window:

sudo dpkg โ€“โ€“list

This command lists all the software, but the list may be too long and not helpful.

To make a list easier to browse add the following:

sudo dpkgโ€“query โ€“l | less

If you know the name of the package you want to remove, you can search for it instead:

sudo dpkgโ€“query โ€“l | grep package_name

Replace package_name with the term you are searching for.

If you donโ€™t know the full name, specify part of a name by surrounding it with asterisks (*), as follows:

sudo dpkgโ€“query โ€“l | grep *partial_name*

We suggest copying the exact software package name (right click and copy) for use later on in the removal process.

Apt-Get Remove Command

To remove a specific package, use the apt-get remove command:

sudo apt-get remove package_name

This command prompts apt to scan through the installed applications and attempt to remove or repair any that are broken.

Apt-Get Purge Command

Replace package_name with the actual package name generated by apt or dpkg.

The remove command only deletes the software, not the configuration files.

To remove the program and config files, use the purgecommand:

sudo apt-get remove โ€“โ€“purge package_name

Clean Command

The apt package manager can also clean up your system.

To delete the cache of old/outdated packages, enter:

sudo apt-get clean

Some programs are installed with dependencies. These are other software packages the program needs to run. Itโ€™s possible to uninstall an application, and still have all its dependencies on your system.

This command prompts apt to scan through the installed applications and attempt to remove or repair any that are broken.

AutoRemove Command

The apt package manager can remove orphaned or unnecessary dependencies with autoremove:

sudo apt-get autoremove

If you have any failed installations, broken dependencies, or corrupted package files, apt can try to repair them with the command:

sudo apt-get โ€“f install

This command prompts apt to scan through the installed applications and attempt to remove or repair any that are broken.

Final Words

We hope you like this article on how to Remove Package on Ubuntu From Command Line. If you know how to use CLI and you are familiar with different commands then your work will be completed fast as compared to using GUI. You can perform multiple tasks by entering commands in the CLI.

I hope you understand this article, Remove Package on Ubuntu From Command Line.

James Hogan
James Hogan
James Hogan is a notable content writer recognized for his contributions to Bollyinside, where he excels in crafting informative comparison-based articles on topics like laptops, phones, and software. When he's not writing, James enjoys immersing himself in football matches and exploring the digital realm. His curiosity about the ever-evolving tech landscape drives his continuous quest for knowledge, ensuring his content remains fresh and relevant.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Related Articles

Hubspot Service Hub review 2024: a comprehensive platform

When it comes to customer support operations, HubSpot Service Hub is an all-encompassing customer service platform that is meant to...
Read more
When players on Windows 11 or 10 try to log in to Steam, they may get the error code E87....
Users of Windows 11 or 10 may find it frustrating to deal with the error number 147-0 in Microsoft Office....
The Microsoft Store is an important part of the Windows operating system because it gives users a single place to...
It can be hard to find the right balance between usefulness, durability, and cost when it comes to kitchen storage....
Both AirDroid and Vysor are well-known tools that help Android users control their devices and mirror them. One of the...