Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Some times I manually install some '.deb' files using dpkg -i *.deb and the apt get broken. So I want to undo last (sometime more) operation. How can I do it

share|improve this question

1 Answer 1

Apt-undo:
A simple way of undoing apt actions

To install, open up a Terminal window, and type in it:

sudo add-apt-repository ppa:lkjoel/apt-undo && sudo apt-get update; sudo apt-get install apt-undo

Usage examples:

apt-undo install yourpackages
apt-undo remove yourpackages
apt-undo purge yourpackages
apt-undo safe-upgrade
apt-undo full-upgrade
apt-undo install yourpackages=old.version
apt-undo install yourpackages=new.version

To undo:

apt-undo undo   

Or
apt-undo undo $HOME/.aptundo/year/month/date/yearmonthdatehourminutesseconds Or
bash $HOME/.aptundo/year/month/date/yearmonthdatehourminutesseconds

Ref:lkubuntu.wordpress.com

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.