Differences between version 24 and predecessor to the previous major change of UbuntuNotes.
Other diffs: Previous Revision, Previous Author, or view the Annotated Edit History
Newer page: | version 24 | Last edited on Thursday, January 25, 2007 12:01:42 am | by StuartYeates | Revert |
Older page: | version 23 | Last edited on Tuesday, July 11, 2006 3:06:51 pm | by IanMcDonald | Revert |
@@ -104,4 +104,17 @@
<verbatim>
echo "clear" >> ~/.bash_logout
</verbatim>
+
+!! Reinstall all packages
+
+There are times when you've damaged your install and but you'd rather rescue the system rather than doing a backup, reinstall and restore of local data. The following script will reinstall the overwhelming majority of packages on your system. Note that it will not fix broken/missing config files and may change the order of entries in grub.
+
+<verbatim>
+for pkg in `dpkg --get-selections | awk '{if ($2 == "install") print $1}'`;
+do
+ apt-get -y --reinstall install $pkg;
+done
+</verbatim>
+
+You will, of course, need to be root to reinstall all packages on your ubuntu system