誤刪 var lib dpkg info目錄

2021-10-22 11:38:10 字數 2348 閱讀 4378

剛裝完系統,誤刪/var/lib/dpkg/info目錄

mkdir /var/lib/dpkg/info

apt-get --reinstall install

`dpkg --get-selections |

grep

'[[:space:]]install'

|cut -f1`

dpkg --configure -a

apt-get update

apt-get upgrade

apt-get download dpkg

dpkg -i dpkg*.deb

apt-get download base-files

sudo dpkg -i base-files*.deb

dpkg --audit

sudo

apt-get update

sudo

apt-get check

然後把丟失的軟體包複製寫到乙個檔案裡

例如我的:先autoremove再install

apt autoremove xauth

apt autoremove xbitmaps

apt autoremove xbrlapi

apt autoremove xcursor-themes

apt autoremove xdg-dbus-proxy

apt autoremove xdg-desktop-portal

apt autoremove xdg-desktop-portal-gtk

apt autoremove xdg-

user

-dirs

apt autoremove xdg-

user

-dirs-gtk

apt autoremove xdg-utils

apt autoremove xfonts-base

apt autoremove xfonts-encodings

apt autoremove xfonts-scalable

apt autoremove xfonts-utils

apt autoremove xinit

apt autoremove xinput

apt autoremove xkb-

data

apt install xauth

apt install xbitmaps

apt install xbrlapi

apt install xcursor-themes

apt install xdg-dbus-proxy

apt install xdg-desktop-portal

apt install xdg-desktop-portal-gtk

apt install xdg-

user

-dirs

apt install xdg-

user

-dirs-gtk

apt install xdg-utils

apt install xfonts-base

apt install xfonts-encodings

apt install xfonts-scalable

apt install xfonts-utils

apt install xinit

apt install xinput..

...

適用前提是已經安裝好了aptitude

#!/bin/bash

for package in

$(cat dpkg-warning.txt |

grep

"dpkg: warning: files list file for package "

|grep -po "'[^']*'"

|sed

"s/'//g");

doaptitude reinstall "$package"

;#如果沒有安裝aptitude, 則可以用apt-get --reinstall "$package";

done

apt-get update

apt-get

install -f

mv /var/lib/dpkg/info/* /var/lib/dpkg/info.bk

rm -rf /var/lib/dpkg/info

mv /var/lib/dpkg/info.bk /var/lib/dpkg/info

apt-get autoremove

誤刪檔案恢復

1,windows系統如果 站中有被刪除的檔案,那麼直接恢復就好 2,如果 曾在eclipse或者idea等工具中編輯過,那麼工具會自動儲存本地記錄,可以從本地記錄中恢復。例如eclipse中,右鍵專案名稱,選擇 restore from local history,在彈出框中可以選擇對檔案進行恢復...

Oracle誤刪恢復

query deleted datarows select from 表名 as of timestamp to timestamp 刪除時間點 yyyy mm dd hh24 mi ss needs auth flash any table data table flashback alter t...

恢復誤刪檔案軟體

easyrecovery 可用行100 easyrecovery pro v6.04 漢化版 位址 裡面有漢化補丁 電腦知識學習網 推薦一款威力非常強大的硬碟資料恢復工具。能夠幫你恢復誤刪檔案 以及重建檔案系統 easyrecovery 不會向你的原始驅動器寫入任何東東,它主要是在記憶體 中重建檔案...