Question: I installed the development packages for X11 today and now want to remove them. I do not remember the exact name of the package that I installed. I installed by running `apt-get install ...` and now want to remove the development package using `apt-get purge --auto-remove <name of package>`. Any suggestions?

Answer: 
If you installed them today, they’ll all be listed in `/var/log/apt/history.log`. Look through that, identify the packages you don’t want, and remove them.
```
sudo apt remove --purge $(ls -tl /var/lib/dpkg/info/*.list | head -n 10 | awk '{print $9}' | xargs -n1 basename | sed -e "s/\.list$//")
sudo apt autoremove --purge

```

`ls -tl /var/lib/dpkg/info/*.list` - gives you the list of packages sorted by time

`head -n 10` - gives you the first 10 packages

`awk '{print $9}'` - selects the 9th column which is the file path

`xargs -n1 basename` - gives the filename

`sed -e "s/\.list$//"` - gives you the package name