How to Uninstall Recently Installed Packages on Ubuntu

Ubuntu is a popular Linux distribution known for its ease of use, stability, and user-friendly approach. One of the things that makes Ubuntu so easy to use is its apt package management system, which enables you to easily install, update, and remove software packages on your Ubuntu system.

In this article, we will show you how to uninstall or remove recently installed software packages on Ubuntu using the graphical user interface (GUI) and the command line interface.

Uninstalling Recently Installed Packages Using GUI

The most straightforward and user-friendly method to uninstall or remove recently-installed packages on Ubuntu is by utilizing the Ubuntu Software Center, as this intuitive approach allows even those unfamiliar with the command line to effortlessly manage their software installations.

1. First, click on the “Activities” button, typically situated at the top-left corner of your screen, and then type “Ubuntu Software” in the search bar to launch the Software Center.

Ubuntu Software Center
Ubuntu Software Center

2. Within the Software Center, select the “Installed” tab found in the top menu, which will present you with a comprehensive list of all applications and packages presently installed on your Ubuntu system.

List of Installed Packages
List of Installed Packages

By default, the Software Center displays packages in alphabetical order. To uninstall the recently-installed packages, click on the “Uninstall” button to start the package removal process.

Uninstall Package in Ubuntu
Uninstall Package in Ubuntu

Once done, you’ll receive a notification confirming the successful removal of the package.

Uninstalling Recently Installed Packages Using CLI

If you prefer to use the command line, you can also uninstall or remove recently-installed packages on Ubuntu by following below these steps.

1. Launch a terminal window, and execute the following apt command to view the list of all recently-installed packages. Here, the tail command is used to display the last 10 lines of a file.

$ sudo apt list --installed | tail -n 10

This will list the 10 most recently-installed packages.

List Recently Installed Packages
List Recently Installed Packages

To uninstall a specific package, use the apt remove command followed by the package name.

$ sudo apt remove <package-name>

Replace <package-name> with the name of the package, you want to uninstall.

Remove Package in Ubuntu
Remove Package in Ubuntu

If you want to remove multiple packages at once, you can list them separated by spaces as shown.

$ sudo apt remove package1 package2 package3

To remove a package completely, including all of its dependencies, run the following command:

$ sudo apt purge <package-name>

After removing packages, you can use the apt autoremove command to uninstall any automatically installed packages that are no longer required as dependencies.

$ sudo apt autoremove

To free up disk space, you can clean the package cache with the following command.

$ sudo apt clean
Conclusion

In this article, we have shown you how to uninstall or remove recently-installed packages on Ubuntu. We have shown you how to do this using both the GUI and the command line.

We hope this article has been helpful. If you have any questions, please feel free to leave a comment below.

Ravi Saive
I am an experienced GNU/Linux expert and a full-stack software developer with over a decade in the field of Linux and Open Source technologies

Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Join the TecMint Weekly Newsletter (More Than 156,129 Linux Enthusiasts Have Subscribed)
Was this article helpful? Please add a comment or buy me a coffee to show your appreciation.

4 thoughts on “How to Uninstall Recently Installed Packages on Ubuntu”

  1. The command “sudo apt list –installed | tail -n 10” does not list the 10 most recently-installed packages. Just the last 10 packages were installed out of the entire list of packages installed on the system. Also, it is not necessary to use sudo for this command.

    Reply
    • @Tom,

      You are right, my apologies for the confusion…

      To list the most recently installed packages on Ubuntu, you can use the following command without the need for sudo:

      $ grep "install " /var/log/dpkg.log | sort -k1,1 -k2,2 -u | tail -n 10
      

      The above command will sort the log entries (/var/log/dpkg.log) based on the date and time of installation and then display the last 10 lines, showing the most recent installations.

      Reply
  2. For any Debian-based (including *buntus) and PCLinuxOS, I use Synaptic exclusively. In my experience, Synaptic is much more functional than any Software Center.

    It also does not have all those distracting graphics that supposedly make it more “user-friendly”. If I need to install or uninstall a package, I do not care what its user rating is.

    I do not need to be presented with large package icons. The look of an icon will not induce me to install a package.

    When I don’t use Synaptic, I will use apt. Software Centers are for those that prize form over function.

    Reply
    • @dragonmouth,

      Synaptic is indeed a popular choice for users who prefer a more advanced and fine-grained control over their software installations and package management.

      Reply

Got Something to Say? Join the Discussion...

Thank you for taking the time to share your thoughts with us. We appreciate your decision to leave a comment and value your contribution to the discussion. It's important to note that we moderate all comments in accordance with our comment policy to ensure a respectful and constructive conversation.

Rest assured that your email address will remain private and will not be published or shared with anyone. We prioritize the privacy and security of our users.