You can do a aptitude search $package_name and reinstall them. But most of the times, libs (packages actually) will be removed if there are no dependencies and the package itself was not installed by you (but because of a dependency with another package).
What you could do, in order to prevent this from happening is running aptitude -s <command>, this will simulate the action:
Code:
aptitude -s remove firefox
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Building tag database... Done
The following packages are BROKEN:
sun-java6-plugin
The following packages have been automatically kept back:
amarok-xine k3b
The following packages have been kept back:
amarok
The following packages will be REMOVED:
firefox
0 packages upgraded, 0 newly installed, 1 to remove and 13 not upgraded.
Need to get 0B of archives. After unpacking 123kB will be freed.
The following packages have unmet dependencies:
sun-java6-plugin: Depends: firefox but it is not installable or
firefox-2 but it is not installable or
iceweasel which is a virtual package. or
mozilla-firefox which is a virtual package. or
iceape-browser but it is not installable or
mozilla-browser but it is not installable or
epiphany-gecko but it is not installable or
epiphany-webkit which is a virtual package. or
epiphany-browser but it is not installable or
galeon but it is not installable or
midbrowser but it is not installable or
xulrunner but it is not installable
Resolving dependencies...
The following actions will resolve these dependencies:
Install the following packages:
firefox-2 [2.0.0.21~tb.21.308+nobinonly-0ubuntu0.8.04.1 (hardy-updates, hardy-security)]
Score is 41
Accept this solution? [Y/n/q/?] y
The following packages have been automatically kept back:
amarok-xine k3b
The following NEW packages will be automatically installed:
firefox-2
The following packages have been kept back:
amarok
The following NEW packages will be installed:
firefox-2
The following packages will be REMOVED:
firefox
0 packages upgraded, 1 newly installed, 1 to remove and 13 not upgraded.
Need to get 9206kB of archives. After unpacking 26.6MB will be used.
Do you want to continue? [Y/n/?] y
Would download/install/remove packages.
BTW, if you only removed the packages, you can still see them with dpkg -l | grep -v "^ii" if not mistaken.
Bookmarks