How to undo packages installed or uninstalled


New Member
I used Fedora for a while and when i remove a package by mistake i can make it undo with "dnf history undo ID",so what is the equivalent command for ubuntu


Active Member
probably another approach is not to undo but simply re-install package if you know the details probably something like :
apt install <package)

or apt-get <package>

I'm on slackware, what i do is a print out of package information using ls:

ls /var/log/packages > /path/to/some/textfile


Active Member
For Ubuntu you can use sudo dpkg -i <name of pkg> to install it.

To remove it sudo apt remove <name of pkg> OR
sudo dpkg -r <package name>

Not sure how you would undo it:-

Hope that helps.

Members online