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.
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.
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.
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.
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.
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.
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.@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:
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.
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.
@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.