apt* family

apt-get 대신 그냥 apt를 사용해도 된다.

```bash

apt-get update package_name

apt-get upgrade package_name

```

`` apt-get update`` : updates the list of available packages and their versions, but it does not install or upgrade any packages.

 

`` apt-get upgrade`` : actually installs newer versions of the packages you have. After updating the lists, the package manager knows about available updates for the software you have installed. This is why you first want to `` update``.

 

`` dist-upgrade`` : dependencies를 체크해서 다른 패키지를 다운로드하거나, 기존에 설치되어 있는 패키지를 제거하기도 한다.

`` full-upgrade`` : 위와 같음.

 

지울 때는 그냥 그냥 `` remove``하지 말고, `` autoremove`` 해야 의존성 라이브러리까지 삭제할 수 있다.

```bash

apt-get autoremove

```

 

 

설치된 패키지 검색

```bash

#CentOS

rpm -qa | grep java

 

# Ubuntu

apt-cache search package_name

 

# mac os

brew list

```

 

OS update && upgrade

https://www.cyberpratibha.com/blog/2017/04/how-to-update-and-upgrade-kali-linux-to-latest-version/

```bash

apt update && apt full-upgrade

// 또는

apt-get update

apt-get upgrade

apt-get dist-upgrade

```

 

버전 확인

```bash

cat /etc/*-release 

```