1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

apt install でインストールしたパッケージをアンインストールするには apt remove, apt purge をすればOKという備忘録

Posted at

apt install でインストールしたパッケージをアンインストールするには apt remove, apt purge をすればOKという備忘録です。

例えば、以下のようにopenssh-serverをインストールした後、

sudo apt install -y openssh-server  # install

以下のようにするとパッケージをアンインストールできる

sudo apt remove -y openssh-server   # uninstall
sudo apt purge -y openssh-server    # uninstall

あまりアンインストールする機会はないかもしれないが、、パッケージの挙動がおかしく再インストールが必要になる場合に役立つかもしれない。

備考

openssh-serverのインストール時に以下のようなエラーが出た場合は再インストールすると解決するかもしれない。

sshd.service - OpenSSH Daemon Loaded: 
loaded (/usr/lib/systemd/system/sshd.service; enabled)
Active: failed (Result: start-limit) since xxx
...
systemd[1]: Unit sshd.service entered failed state.
systemd[1]: sshd.service holdoff time over, scheduling restart. 
systemd[1]: Stopping OpenSSH Daemon... 
systemd[1]: Starting OpenSSH Daemon...
systemd[1]: sshd.service start request repeated too quickly

参考

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?