Why downgraded Postgresql version?

Colleagues, good afternoon.

Explain to me what kind of magic?) Put on ubuntu server 18.04 postgresql for 1C via apt-get. It turned out that postgresql need from the site 1C. Removed postgresql using apt=get remove. Installed Postgresql from the site 1C - everything works.
But every night, the version is reset to the old one!)) What the hell is this? Some task scheduler? Error at 3:30 in the morning appears.

At the bottom of the conclusion in the evening and in the morning.

root@legacy:~# dpkg-l | grep postgres
ii postgresql-10 10.5-24.1 C amd64 object-relational SQL database, version 10 server
ii postgresql-client-10 10.5-24.1 C amd64 front-end programs for PostgreSQL 10
ii postgresql-client-common 190 all manager for multiple PostgreSQL client versions
ii postgresql-common 190 all PostgreSQL database-cluster manager
ii postgresql-doc-10 10.5-24.1 C all documentation for the PostgreSQL database managemen
ii postgresql-server-dev-10 10.5-24.1 C amd64 development files for PostgreSQL 10 server-side pro
root@legacy:~# dpkg-l | grep postgres
ii postgresql-10 10.8-0ubuntu0.18.04.1 amd64 object-relational SQL database, version 10 server
ii postgresql-client-10 10.8-0ubuntu0.18.04.1 amd64 front-end programs for PostgreSQL 10
ii postgresql-client-common 190 all manager for multiple PostgreSQL client versions
ii postgresql-common 190 all PostgreSQL database-cluster manager
ii postgresql-doc-10 10.8-0ubuntu0.18.04.1 all documentation for the PostgreSQL database managemen
ii postgresql-server-dev-10 10.8-0ubuntu0.18.04.1
March 23rd 20 at 18:51
1 answer
March 23rd 20 at 18:53
Solution
So it's not a downgrade, it's upgrade packages to newer version, which is quite standard.

Solved by disabling the update for packages:
echo "postgresql-10 hold" | sudo dpkg --set-selections
echo "postgresql-client-10 hold" | sudo dpkg --set-selections
echo "postgresql-client-common hold" | sudo dpkg --set-selections
echo "postgresql-common hold" | sudo dpkg --set-selections
echo "postgresql-doc-10 hold" | sudo dpkg --set-selections
echo "postgresql-server-dev-10 hold" | sudo dpkg --set-selections

sudo apt-mark hold postgresql 10
sudo apt-mark hold postgresql-client-10
sudo apt-mark hold postgresql-client-common
sudo apt-mark hold postgresql-common
sudo apt-mark hold postgresql-doc-10
sudo apt-mark hold postgresql-server-dev-10
Well, yeah, upgrade) Thanks, did not know that it automatically does it! Will check today) - Osborne.Senger commented on March 23rd 20 at 18:56
Works, thank you! - Osborne.Senger commented on March 23rd 20 at 18:59

Find more questions by tags UbuntuPostgreSQLLinux