apt commands

Moderator: Forum moderators

Post Reply
User avatar
bigpup
Moderator
Posts: 6962
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 897 times
Been thanked: 1517 times

apt commands

Post by bigpup »

apt commands.jpg
apt commands.jpg (81.48 KiB) Viewed 4065 times

.
.
pkg is the exact name of the package you want to work on.

Example:
To install a new package called nginx, enter:
apt install nginx
.
.
For more specific and detailed info.
Use the man command or --help option.

Example:
man apt
apt --help
.

Big Note:
The latest version of Bookworm Pup64 should have a information file under menu -> Help -> How to use the APT Package Manager
.
.
Note:

apt upgrade will only update user-installed packages. Updates for preinstalled packages are (intentionally) disabled using apt-mark hold to avoid updates from polluting your save file/folder and/or slowing down the system, and to prevent updates from undoing Puppy-specific customization done to the Debian packages at Puppy build time.

You can use apt-mark unhold to allow updates to a package, but this is risky. Updating your entire Puppy to a new build is a much safer way to update all core system packages.

(Debian 12 is currently frozen and the only changes are important bug fixes. If you don't see any available updates or see updates today but don't see more updates tomorrow, this is probably why. Generally, the Debian stable release receives few updates, just stability and security fixes, and Debian 12 will receive even fewer updates after the release.)

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

ozsouth
Posts: 1546
Joined: Sun Jul 12, 2020 2:38 am
Location: S.E. Australia
Has thanked: 240 times
Been thanked: 684 times

Re: apt commands

Post by ozsouth »

I found 'apt autoremove' does a cleanup & should be run after 'apt remove (pkg name)', to remove remnants.

User avatar
bigpup
Moderator
Posts: 6962
Joined: Tue Jul 14, 2020 11:19 pm
Location: Earth, South Eastern U.S.
Has thanked: 897 times
Been thanked: 1517 times

Re: apt commands

Post by bigpup »

Example for getting all sub-packages and optional dependencies.

program VLC

dimkr wrote: Wed Jul 26, 2023 6:03 am

You can use apt install --install-recommends vlc to install VLC including all optional sub-packages and optional dependencies.

Thanks to dimkr for this information! :thumbup:

The things you do not tell us, are usually the clue to fixing the problem.
When I was a kid, I wanted to be older.
This is not what I expected :o

backi
Posts: 599
Joined: Thu Jul 23, 2020 2:28 pm
Has thanked: 75 times
Been thanked: 69 times

Re: apt commands

Post by backi »

@bigpup :

Very helpful :thumbup:

User avatar
mikeslr
Posts: 2947
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 907 times

Re: apt commands

Post by mikeslr »

Something to consider, https://www.forum.puppylinux.com/viewto ... 165#p97165. Thanks, fred.

User avatar
mikeslr
Posts: 2947
Joined: Mon Jul 13, 2020 11:08 pm
Has thanked: 178 times
Been thanked: 907 times

Re: apt commands

Post by mikeslr »

Discussion about using apt to remove packages, including those installed via synaptic, here: https://www.forum.puppylinux.com/viewto ... 78#p110378

User avatar
trawglodyte
Posts: 257
Joined: Mon Dec 11, 2023 11:32 am
Location: my cave
Has thanked: 234 times
Been thanked: 77 times

Re: apt commands

Post by trawglodyte »

/var/log/apt/history.log is a record of packages you add/remove with apt. It can be handy, I also like to copy/paste the suggested/recommended packages in a text editor and save them in a folder, like /root/AptNotes or something.

Especially with the A/V stuff, sometimes an app is missing a feature or something doesn't work right and I can go back to the suggested packages when I installed it and find what I need to make it work.

low-bar learner

williwaw
Posts: 1921
Joined: Tue Jul 14, 2020 11:24 pm
Has thanked: 170 times
Been thanked: 360 times

Re: apt commands

Post by williwaw »

apt install --install-recommends vlc | tee vlc.log

will create the file vlc.log that contains the sometimes helpful messages that roll by during the install.

User avatar
fredx181
Posts: 3037
Joined: Tue Dec 03, 2019 1:49 pm
Location: holland
Has thanked: 367 times
Been thanked: 1290 times
Contact:

Re: apt commands

Post by fredx181 »

Some may not know, one of the differences between how apt and apt-get operates is that when installing package(s) using apt, e.g. apt install <package(s)>, then after install succeeded, the downloaded .deb files will be removed.
As opposed to when using apt-get, apt-get install <package(s)>, then the .deb files will be kept in /var/cache/apt/archives/ .
edit: and to remove these cached .deb packages: apt clean
edit2: When installing from Synaptic, it works the same as apt-get, i.e. packages are not removed from the cache after installing.

dancytron
Posts: 719
Joined: Fri Dec 13, 2019 6:26 pm
Has thanked: 516 times
Been thanked: 215 times

Re: apt commands

Post by dancytron »

bigpup wrote: Wed Jul 26, 2023 2:41 pm

Example for getting all sub-packages and optional dependencies.

program VLC

dimkr wrote: Wed Jul 26, 2023 6:03 am

You can use apt install --install-recommends vlc to install VLC including all optional sub-packages and optional dependencies.

Thanks to dimkr for this information! :thumbup:

Especially handy for whatever archiving/unzipping program you use so you don't have to lookup and install the package for each format as they fail to work.

User avatar
mikewalsh
Moderator
Posts: 6134
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 783 times
Been thanked: 1966 times

Re: apt commands

Post by mikewalsh »

Hm. Nice one.

Thanks to everybody for posting this info. I had to laugh; everybody else in the Linux world has been using this stuff for decades.....yet here WE here, just learning all this for the first time!

It's all good stuff, though.

Mike. :thumbup:

Post Reply

Return to “BookwormPup”