0

I made the grave mistake of running the command sudo apt-get install -y games-minesweeper thinking it would only install one game. It ended up installing like 30 or so games:

installed games

The problem is i can't uninstall these packages since they don't show up in the Ubuntu software app, and running:

sudo apt-get remove games-minesweeper

only returns:

Package 'games-minesweeper' is not installed, so not removed

I've also tried to run sudo apt-get remove <AppName> and it hasn't found any of the games' packages by the name of the application.

I've tried to also run sudo apt-get remove <Debian Package ID> and it hasn't found any of the games' packages by that either.

How do i uninstall these packages, or find out their package name? so i can run sudo apt-get remove

Lorenz Keel
  • 8,905
javier1zq
  • 109
  • 1

1 Answers1

0

You have to locate their package names by using commands like

dpkg -S $(grep -r Penguins --include=*.desktop /usr/ 2> /dev/null --files-with-matches)

where grep -r Penguins --include=*.desktop /usr/ 2> /dev/null --files-with-matches running recursive search for Penguins in /usr folder and list the names of found *.desktop files. Then dpkg -S … finds corresponding package names for found files.

Penguins… came from ace-of-penguins package. Remove them with

sudo apt-get remove ace-of-penguins
N0rbert
  • 99,918
  • I agree with this method, but in my specific situation it was more effective to check /var/log/apt/history.log as @Jos mentioned and see what specific packages were installed with the command i ran and remove them. – javier1zq Sep 29 '21 at 12:02